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
This issue, which describes the problem well: #22388 was closed bcause it's actually Webpack's fault and Webpack used to unconditionally rewrite import.meta.url to something useless in the absence of a loader. But now we can stop Webpack from doing that, using the parser.javascript.importMeta option: webpack/webpack#15246
... except that to do this in Angular requires a custom webpack configuration.
Since we are not supposed to have webpack-specific configuration in the angular config, it would be nice if the default behaviour of Angular was non-broken. Obviously it would have to be done while conserving the (arguably broken and inconsistent) policy of sometimes using loaders and sometimes not using them.
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Previously, it was noticed that when using ES modules (which Angular very much wants you to do), one cannot reference assets using
import.meta.url
(which is a web standard and really ought to work). See: https://github.com/angular/angular-cli/issues?q=is%3Aissue+import.meta.url+This issue, which describes the problem well: #22388 was closed bcause it's actually Webpack's fault and Webpack used to unconditionally rewrite
import.meta.url
to something useless in the absence of a loader. But now we can stop Webpack from doing that, using theparser.javascript.importMeta
option: webpack/webpack#15246... except that to do this in Angular requires a custom webpack configuration.
Since we are not supposed to have webpack-specific configuration in the angular config, it would be nice if the default behaviour of Angular was non-broken. Obviously it would have to be done while conserving the (arguably broken and inconsistent) policy of sometimes using loaders and sometimes not using them.
Minimal Reproduction
See #22388
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: