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
With webpack's asset loader setup up, you should be able to import assets like images from you app folder. That works indeed, unless you name that folder you put those assets into as... assets! 😅
Doing so, we are getting errors like
Module not found: Error: Can't resolve './assets/image.png' in '/path/to/app/node_modules/.embroider/rewritten-app'
Looking at node_modules/.embroider/rewritten-app, there is an assets folder, but that one contains build output like vendor.js. Seems there is some kind of name clashing happening here. And indeed, renaming that app/assets folder to e.g. app/images does fix that problem!
This is unfortunate, as it is unexpected, and assets is a pretty common choice for... assets! 😏 So likely to trip up other folks!
Note that this is not an issue for classic builds w/ ember-auto-import and allowAppImports!
This is using stable v3 btw!
The text was updated successfully, but these errors were encountered:
@simonihmig what is your actual setup?
I ask because I have am app/assets/styles.css
which gets imported in app.js as import './assets/styles.css just fine no error
With webpack's asset loader setup up, you should be able to import assets like images from you app folder. That works indeed, unless you name that folder you put those assets into as...
assets
! 😅Doing so, we are getting errors like
Looking at
node_modules/.embroider/rewritten-app
, there is anassets
folder, but that one contains build output likevendor.js
. Seems there is some kind of name clashing happening here. And indeed, renaming thatapp/assets
folder to e.g.app/images
does fix that problem!This is unfortunate, as it is unexpected, and
assets
is a pretty common choice for... assets! 😏 So likely to trip up other folks!Note that this is not an issue for classic builds w/ ember-auto-import and
allowAppImports
!This is using stable v3 btw!
The text was updated successfully, but these errors were encountered: