Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack5 does not build anymore #982

Closed
deleonio opened this issue Oct 23, 2020 · 8 comments
Closed

Webpack5 does not build anymore #982

deleonio opened this issue Oct 23, 2020 · 8 comments

Comments

@deleonio
Copy link

Link:
https://github.com/martinoppitz/poc-flexible-web-application-architecture/runs/1296037303?check_suite_focus=true#step:5:312

Aurelia v1

馃悰 Bug Report

馃 Expected Behavior

馃槸 Current Behavior

馃拋 Possible Solution

馃敠 Context

馃捇 Code Sample

馃實 Your Environment

Software Version(s)
Aurelia
Language
Browser
Bundler
Operating System
NPM/Node/Yarn
@bigopon
Copy link
Member

bigopon commented Oct 23, 2020

The error stack is

Error: Cannot find module 'webpack/lib/BasicEvaluatedExpression'
Require stack:
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/aurelia-webpack-plugin/dist/AureliaDependenciesPlugin.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/aurelia-webpack-plugin/dist/AureliaPlugin.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/aurelia-webpack-plugin/dist/index.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/@leanup/cli-aurelia/lib/webpack.config.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/@leanup/cli-aurelia/webpack.config.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/webpack.config.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/webpack-nano/lib/config.js
- /home/runner/work/poc-flexible-web-application-architecture/poc-flexible-web-application-architecture/workspace/node_modules/webpack-nano/bin/wp.js

It's caused by this line https://github.com/aurelia/webpack-plugin/blob/9f6f7983312c66f857e79b744e4ec257cc287b8b/src/AureliaDependenciesPlugin.ts#L2

@jods4 any suggestion for fixing this?

@deleonio
Copy link
Author

@deleonio
Copy link
Author

@jods4
Copy link

jods4 commented Oct 30, 2020

@bigopon sorry I haven't had time to look into Webpack 5 support yet.
From the callstack, it seems clear that they renamed/removed some parts that this plugin depended upon, namely webpack/lib/BasicEvaluatedExpression.
If we're lucky it was just moved and we can update the reference.

If we're unlucky it was removed or refactored more deeply.
In this case we need to replace the code that used it.
Sadly its use is a bit technical and it quite a few places, see:
https://github.com/aurelia/webpack-plugin/search?q=BasicEvaluatedExpression

As far as fixing goes, we need to keep compatibility with Webpack 4 in mind. This is surely gonna be a very incompatible change.
For the transition from Webpack 3 -> 4 we decided to align the plugin version number (so currently aurelia-webpack-plugin is 4.0), as we're unlikely to make functional changes anyway.
So Webpack 3 users reference aurelia-webpack-plugin 3, Webpack 4 the plugin in v. 4.
I suggest we keep this convention and publish those breaking changes as v5.

This issue would be better in aurelia/webpack-plugin if someone feels like moving it.

@deleonio
Copy link
Author

deleonio commented Nov 3, 2020

It would be very good if we fix it. As I plan to publish a larger article about the @leanup CLI in December.

This should also still contain Aurelia.

https://github.com/leanupjs/leanup/milestone/2
https://github.modevel.de/poc/next/#series

@deleonio
Copy link
Author

@deleonio
Copy link
Author

When should Aurelia v2 come?

@deleonio
Copy link
Author

@bigopon I privide a PR aurelia/webpack-plugin#169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants