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
My original issue is in #1752 - which I then found out are two issues. So I'm extracting the latter into this one, for which I do have a repro.
When using webpack alias, this works... well until the alias points to an index.gts file. If it is an index.ts file that exports a gts file, then this is the original bug in #1752
When importing a gts file from a location under a webpack alias, this doesn't work. Toggling the import statement in the last link would "fix" it.
The error message is unfortunately not very helpful, yet it describes the phenomena:
index.js:605 Uncaught Error: Could not find module `@foo/home` imported from `(require)`
at missingModule (loader.js:247:1)
at findModule (loader.js:258:1)
at requireModule (loader.js:24:1)
at ../../.pnpm/@embroider+babel-loader-9@3.1.1_@embroider+core@3.4.4_supports-color@8.1.1_webpack@5.90.1/node_modules/@embroider/babel-loader-9/index.js?{"variant":{"name":"dev","runtime":"browser","optimizeForProduction":false},"appBabelConfigPath":"/Users/thomas/code/playground/ember-webpack-alias/node_modules/.embroider/rewritten-app/_babel_config_.js","cacheDirectory":"/private/var/folders/95/bfjp2z0x5l57lzbp6c047rxw0000gn/T/embroider/webpack-babel-loader"}!../../.pnpm/@embroider+webpack@3.2.2_@embroider+core@3.4.4_webpack@5.90.1/node_modules/@embroider/webpack/src/virtual-loader.js?f=%2F%40embroider%2Fext-cjs%2F%40foo%2Fhome&a=%2FUsers%2Fthomas%2Fcode%2Fplayground%2Fember-webpack-alias! (home:2:18)
at __webpack_require__ (bootstrap:19:1)
at ./routes/application.ts (router.ts:11:3)
at __webpack_require__ (bootstrap:19:1)
at Module.callback (ember-webpack-alias.js:25:57)
at Module.exports (loader.js:106:1)
at requireModule (loader.js:27:1)
The cause for this?
Well, the original issue in bug #1752 was embroider resolver's meta is not propagating - and I think it may has to do something with propagation here. Ie. propagating all babel plugins to entries within the alias config?
The text was updated successfully, but these errors were encountered:
This could be something that #1794 intends to try to fix 🤔 the PR is not yet ready to test to see if it fixes your issue but I imagine it will once it's finished
My original issue is in #1752 - which I then found out are two issues. So I'm extracting the latter into this one, for which I do have a repro.
When using webpack alias, this works... well until the alias points to an
index.gts
file. If it is anindex.ts
file that exports agts
file, then this is the original bug in #1752The repro is available here: https://github.com/gossi/repro-ember-webpack-alias
Points of interest are:
ember-cli-build.js
- contains alias configtsconfig.json
- the same config for TSWhen importing a gts file from a location under a webpack alias, this doesn't work. Toggling the import statement in the last link would "fix" it.
The error message is unfortunately not very helpful, yet it describes the phenomena:
The cause for this?
Well, the original issue in bug #1752 was
embroider resolver's meta is not propagating
- and I think it may has to do something with propagation here. Ie. propagating all babel plugins to entries within the alias config?The text was updated successfully, but these errors were encountered: