Closed andresmrm closed 4 years ago
@andresmrm Hi! Sorry for the delayed reply.
One way to do this would be to use both presets but via separate builds, using: https://neutrinojs.org/usage/#generating-multiple-builds
Thanks for the reply! I ended up using webpack directly.
My package is a library with some React components. Something like:
If I only use
@neutrinojs/react-components
, it only builds thecomponents
folder. If I only use@neutrinojs/library
, it crashes complaining about React JSX syntax.I tried to:
And got:
DuplicateRuleError: @neutrinojs/compile-loader has been used twice with the same ruleId of 'compile', which would overwrite the existing configuration. If you are including this preset manually to customise rules configured by another preset, instead use that preset's own options to do so.
Tried to add
index.js
toreact-components
mains, but it ignored it and only built the components.I investigated both presets source codes, but couldn't find how to solve this case without creating a new preset replicating most of the code in them.
So, what would be the "neutrino's way" of doing this type of customization?