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
I ran into an error cannot read property 'noParse' of undefined after upgrading to webpack 3. It seems that this.options.module is now undefined 😢 . Looking over the docs on webpack loaders (https://webpack.js.org/contribute/writing-a-loader/) it seems they discourage accessing the options directly, and they even go so far as to say that options is read-only.
I was able to get things working by explicitly adding the noParse rule to my config:
noParse: /i18nliner\/dist\/lib\/i18nliner/,
and creating a simpler version of your webpack loader that doesn't set the noParse config anymore:
Hi John! 👋
I ran into an error
cannot read property 'noParse' of undefined
after upgrading to webpack 3. It seems thatthis.options.module
is now undefined 😢 . Looking over the docs on webpack loaders (https://webpack.js.org/contribute/writing-a-loader/) it seems they discourage accessing the options directly, and they even go so far as to say that options is read-only.I was able to get things working by explicitly adding the
noParse
rule to my config:noParse: /i18nliner\/dist\/lib\/i18nliner/,
and creating a simpler version of your webpack loader that doesn't set the
noParse
config anymore:I'm not sure if there's still a way to automatically set the
noParse
config from within the loader.The text was updated successfully, but these errors were encountered: