You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an importable npm package is typically referenced with package.json that contains a main property.
e.g. "main": "lib/index.js". To build this index.js file requires a distinct build script than the current distribution build. The entry point index only exports the App module and not the DOM element binding or the redux Provider or store, as these would be implemented by the downstream consumer.
For example, the entry point index-lib.js only contains.
export{App}from'./components/App';
The text was updated successfully, but these errors were encountered:
sure you can do both, but not in the same package. I would prioritize ES6 above CJS require package support, since this is how want to use it. But there may those who prefer CJS. The way that I see it, ES6 is the future, so for a new app, I think it should be the target idiom. Anyway, if someone wants to use CJS, they can use the distribution, so npm is actually not required for them. npm is however required for those who want to import an ES6 module.
an importable npm package is typically referenced with package.json that contains a
main
property.e.g.
"main": "lib/index.js"
. To build this index.js file requires a distinct build script than the current distribution build. The entry point index only exports theApp
module and not the DOM element binding or the redux Provider or store, as these would be implemented by the downstream consumer.For example, the entry point
index-lib.js
only contains.The text was updated successfully, but these errors were encountered: