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
As opposed to that, it does not occur if the loader and options properties are attached to the rule directly:
{test: /\.vue$/,loader: 'vue-loader',options: {}}
The problem happens on every loader, it doesn't need to be the vue-loader itself. (Although that's not unexpected since vue-loader iterates over all loaders.)
Ultimately, I'm not sure if this is an issue with vue-loader or rather with webpack itself.
The text was updated successfully, but these errors were encountered:
loilo
changed the title
[v15.0.0-beta.2] Normalizing of rules fails
[v15.0.0-beta.2] Normalization of rules fails
Mar 23, 2018
Version
15.0.0-beta.2
Reproduction link
https://github.com/Loilo/repro-vue-loader-normalize
Steps to reproduce
Clone the repository and install npm dependencies:
Run webpack:
What is expected?
Webpack should compile.
What is actually happening?
Webpack fails with a very terse
Cannot set property 'undefined-0' of undefined
and no stack trace.I've dug into the issue and can make some educated guesses about the details:
The normalization of a rule fails.
It seems to have to do with setting the
ident
in particular.A stack trace is available if the normalization step is invoked manually (
node standalone.js
in the reproduction repo):The error occurs if there's an
options
property on an object inside ause
array:As opposed to that, it does not occur if the
loader
andoptions
properties are attached to the rule directly:The problem happens on every loader, it doesn't need to be the
vue-loader
itself. (Although that's not unexpected sincevue-loader
iterates over all loaders.)Ultimately, I'm not sure if this is an issue with
vue-loader
or rather withwebpack
itself.The text was updated successfully, but these errors were encountered: