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
Module resolution depends on target, but always checks fields in package.json :
target web : fields browser, module, main
target node: fields module, main
So, when the package is used as
pure Node package - main will be used
by WebPack - browser or module will be used (depending on target)
by browser - browser version will be used
BTW: for published on NPM version we will get the public CDN: https://unpkg.com/
What to do in this issue:
Create a project, and use route4me-node as a dependency.
Then pack this project with webpack, and look at the result. The result MUST LOOKS BRILLIANT!!! Ho ho ho
The text was updated successfully, but these errors were encountered:
ancestor of #16
WebPack uses the concept of targets and provides module resolution rules (https://webpack.js.org/concepts/module-resolution/)
Module resolution depends on target, but always checks fields in
package.json
:web
: fieldsbrowser
,module
,main
node
: fieldsmodule
,main
So, when the package is used as
main
will be usedbrowser
ormodule
will be used (depending on target)browser
version will be usedBTW: for published on NPM version we will get the public CDN: https://unpkg.com/
What to do in this issue:
Create a project, and use
route4me-node
as a dependency.Then pack this project with webpack, and look at the result. The result MUST LOOKS BRILLIANT!!! Ho ho ho
The text was updated successfully, but these errors were encountered: