-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use import maps for back-compat / future-proof #7
Comments
The mapping itself seems to work in my tests so far, but it doesn't look like the import succeeds. I get an error when mapping Core could distribute On the other hand, plugins could avoid enqueueing I don't think import maps will ever provide a way to map to We can still use import maps for 3rd party dependencies in #1, but for Core we might be stuck referencing 1: Not using |
Maybe the existing |
Nevermind, that shouldn't affect this since we'd be mapping to If we do start using |
Maybe we can use bare imports in the dev workflow, but have them configured as |
Import maps are available by default in Chrome now 🎉 It'll probably still be awhile before other browsers do it, though. |
This would allow us to change imports like this:
const { Card } = wp.components;
...to the ES6 standard:
import { Card } from '@wordpress/element';
Background: https://dev.to/open-wc/on-the-bleeding-edge-3cb8
Shim: https://www.npmjs.com/package/es-module-shims
The text was updated successfully, but these errors were encountered: