Exports maps are now available in node & rollup & webpack.
Maybe we can have a convention/recommendation for what to define for web components? 馃
Given the following component/package my-input;
src/MyInput.js
src/my-input.js
index.js
From a users point of view it would probably be nice to have imports like this:
import { MyInput } from 'my-input'; // <--- side effect free
import 'my-input/element'; // <--- side effect customElements.define(...)
This would lead to the following export map
"name": "my-input",
"exports": {
".": "./index.js", // <--- side effect free
"./element": "./src/my-input.js"
}
What do you think?
Exports maps are now available in node & rollup & webpack.
Maybe we can have a convention/recommendation for what to define for web components? 馃
Given the following component/package
my-input;From a users point of view it would probably be nice to have imports like this:
This would lead to the following export map
What do you think?