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
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Whilst trying out the testcase repo in #1066, I got the following exception:
$ yarn build --inspect-new > build.js
TypeError: Cannot read property 'plugins' of undefined
at C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\deepmerge\dist\umd.js:63:55
at Array.forEach (<anonymous>)
at mergeObject (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\deepmerge\dist\umd.js:62:25)
at deepmerge (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\deepmerge\dist\umd.js:84:16)
at config.module.rule.use.tap.opts (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\@neutrinojs\loader-merge\index.js:6:16)
at Object.tap (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\webpack-chain\src\Use.js:14:20)
at C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\@neutrinojs\loader-merge\index.js:6:4
at Api.use (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\neutrino\src\api.js:200:7)
at module.exports (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\neutrino-preset-emotion\index.js:4:12)
at Api.use (C:\Users\Ed\src\dfsfdsfsfdsfwfsd\node_modules\neutrino\src\api.js:200:7)
It seems that @neutrinojs/loader-merge should either:
throw will a clearer message if the rule doesn't exist
check that the rule exists first, and if not, then do nothing (though this could hide mistakes)
That said, (1) overlaps with #687 (in that we should probably apply the same fix there to rules as well as plugins), and I've also been wondering if loader-merge is really necessary, since it's adding another layer of abstraction around something that only takes a few lines of webpack-chain usage.
The text was updated successfully, but these errors were encountered:
Whilst trying out the testcase repo in #1066, I got the following exception:
This turned out to be because
neutrino-preset-emotion
was listed before@neutrinojs/react
and so thecompile
rule that the emotion preset was hoping to modify didn't yet exist:https://github.com/nwaywood/neutrino-preset-emotion/blob/f538455dafff6310e150aaa113c2f9f0d80dfa5e/index.js#L4-L6
It seems that
@neutrinojs/loader-merge
should either:That said, (1) overlaps with #687 (in that we should probably apply the same fix there to rules as well as plugins), and I've also been wondering if loader-merge is really necessary, since it's adding another layer of abstraction around something that only takes a few lines of webpack-chain usage.
The text was updated successfully, but these errors were encountered: