embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
339 stars 137 forks source link

not all dependencies support webpack 5 #783

Open timiyay opened 3 years ago

timiyay commented 3 years ago

We're experimenting with embroider 0.40.0, and are getting warnings about having the incorrect version of webpack installed.

When using:

"@embroider/compat": "0.40.0",
"@embroider/core": "0.40.0",
"@embroider/webpack": "0.40.0",

...we get the following warnings, depending on what version of webpack we install.

Webpack 4

When we have "webpack": "^4.46.0" installed, we get the following warning during yarn install:

warning " > @embroider/webpack@0.40.0" has incorrect peer dependency "webpack@^5.0.0".

Webpack 5

When we have "webpack": "^5.35.1" installed, we get the following warning during yarn install:

warning "@embroider/webpack > @embroider/babel-loader-7 > babel-loader@7.1.5" has incorrect peer dependency "webpack@2 || 3 || 4".
timiyay commented 3 years ago

For additional context, our app is a pretty-new Ember 3.24 app (not many dependencies or legacy cruft), which also uses ember-auto-import@1.11.2

$ yarn why babel-loader

[1/4] 🤔  Why do we have the module "babel-loader"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "babel-loader@8.1.0"
info Reasons this module exists
   - "ember-auto-import" depends on it
   - Hoisted from "ember-auto-import#babel-loader"
info Disk size without dependencies: "412KB"
info Disk size with unique dependencies: "2.32MB"
info Disk size with transitive dependencies: "5.55MB"
info Number of shared dependencies: 29
=> Found "@embroider/webpack#babel-loader@8.2.2"
info This module exists because "@embroider#webpack" depends on it.
=> Found "@embroider/babel-loader-7#babel-loader@7.1.5"
info This module exists because "@embroider#webpack#@embroider#babel-loader-7" depends on it.