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
The sideEffect field in project root package.json shouldn't affect the bundled code inside the project.
Actual Behavior
It has effects.
app-index.js → app-output.js...
created app-output.js in 101ms
var dist = { name: 'object' };
console.log(dist);
app-index.js → app-output-no-node-resolve.js...
created app-output-no-node-resolve.js in 57ms
var dist = { name: 'object' };
dist.sideEffect = true;
console.log(dist);
Additional Information
I'm building a library without side effects. However the demo site (may have some side-effects, for example css or some codes) is both placed in same the folder. Should we make codes out of node_modules follow its package.json?
The text was updated successfully, but these errors were encountered:
The sideEffect field in project root package.json shouldn't affect the bundled code inside the project.
This makes sense although I haven't checked the spec yet.
I think for each file we always look at the nearest package.json to determine if the file has side effects, which we probably shouldn't do for the root package. Added a currently failing test in 91a881d
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ
https://repl.it/join/xcjdwawr-07akioni
Expected Behavior
The
sideEffect
field in project root package.json shouldn't affect the bundled code inside the project.Actual Behavior
It has effects.
Additional Information
I'm building a library without side effects. However the demo site (may have some side-effects, for example css or some codes) is both placed in same the folder. Should we make codes out of node_modules follow its
package.json
?The text was updated successfully, but these errors were encountered: