Closed berghall closed 1 year ago
Did reading through our CHANGELOG yield any meaningful results? If not, please share a code-sandbox or example project that allows us to reproduce the issue.
Unfortunately I can't give you the project which this is happening in and I couldn't reproduce it with a minimal repro. I got it however to build if I remove the sideEffects: false, property from min-dash package.json, so that sideEffects would default to true. Could there be some side effects min-dash is leaving out?
We'll double-check min-dash to see if it leaks side-effects. Thanks for drilling down into this one further!
Unfortunately I could not find how min-dash would leak side-effects.
What could be interesting is upgrading step-by-step and see when it starts to fail.
Okay, that's unfortunate. I'll upgrade version-by-version until it breaks in the coming days. Thanks for looking into it.
So, bpmn-js@10.0.0 with diagram-js@8.9.0 builds fine, but bpmn-js@10.1.0 with diagram-js@9.1.0 throws the same error. Here is tag comparison for bpmn-js https://github.com/bpmn-io/bpmn-js/compare/v10.0.0...v10.1.0, tag comparison for diagram-js https://github.com/bpmn-io/diagram-js/compare/v8.9.0...v9.1.0 and for min-dash https://github.com/bpmn-io/min-dash/compare/v3.5.2...v4.0.0.
The error says that something is wrong with chunk/module logic, so that change in min-dash to rollup.config.js is ringing some kind of bell.
Thanks for further root causing.
Indeed with diagram-js@9.x we moved to ES2018 as a library target. Same for min-dash which we also turned into a module
(https://github.com/bpmn-io/min-dash/compare/v3.8.1...v4.0.0).
May that be the offender? You could override min-dash (move back to 3.8.1). API / interface is the same.
For the record a similar issue has previously been reported to webpack (https://github.com/webpack/webpack/issues/12114), but fixed late 2020.
Describe the Bug I'm updating from bpmn-js 8.2.2 to bpmn-js 10.3.0, but when I'm trying to build a production bundle with the command:
webpack --mode=production --progress --color --config webpack.config.js
it fails to this error: Project directory omittedwebpack.config.js Sensitive app entries omitted, replaced with app1 and app2 to simulate multiple entries
package.json Sensitive content omitted
tsconfig.app.json
In development mode it works. The production build works with optimization.concatenateModules set to false in the webpack config, but that breaks some of the app pages in runtime and removes default optimization which is bad.
Steps to Reproduce
Create React + webpack project with the webpack.config.js config and run
webpack --mode=production --progress --color --config webpack.config.js
Expected Behavior Expected production bundle to build successfully
Environment
cc @nickeeex