-
Notifications
You must be signed in to change notification settings - Fork 214
[v9] options.extensions not used #1404
Comments
Hi! Thank you for reporting. Yeah this looks like a bug. @eliperelman it seems like we should be setting the default extensions list here (rather than declaring neutrino/packages/neutrino/Neutrino.js Lines 31 to 34 in 46793f2
...and then referring to neutrino/packages/neutrino/Neutrino.js Lines 83 to 91 in 46793f2
We should also add some tests for this, since there currently aren't any for Thoughts? |
@edmorley it's funny you mention that, because I started doing exactly that yesterday. Then I remembered that the order of these extensions is very important, so I'm wondering if setting this in options should overwrite instead of merge? |
Ah yes I think it should override. |
@eliperelman hi :-) Did you have a WIP for this locally? |
@eliperelman, @edmorley If no one has a WIP of this, I can take a stab this week! |
Thanks for the clear bug report, @rkostrzewski. Just pushed a PR: #1477 |
Bug
Please try to answer the following questions:
9.0.0-rc.3
@neutrinojs/react@9.0.0-rc.3 (should be visible with compile-loader only)
npm@6.7.0
node@10.8.0
macOS
npx @neutrinojs/create-project@9.0.0-rc.3
with onlyReact
on.neutrinorc.js
to look like this:src/index.ts
file and removedsrc/index.js
/webpack --mode production
Build finishes successfully because
src/index.ts
is resolved by webpack and processed by babelBuild fails with error:
Based on quick investigation this might occur because
options.extensions
is not used inNeutrino.getOptions
insteadmoduleExtensions
variable is used that is initialised only withsource
fromneutrino/extensions
module (changing that declaration to includeoptions.extensions
yields a successful build however on v8 the code looks the same yet extension'foo'
works in v8)The text was updated successfully, but these errors were encountered: