Closed solidevolution closed 4 years ago
use exactly that, include
and exclude
patterns. F.e.
babel(Object.assign(babelConfig, {
runtimeHelpers: true,
exclude: [ 'node_modules/**' ],
include: [
'src/**',
'node_modules/@awaitbox/**'
],
})),
buble(Object.assign(bubleConfig, {
exclude: [ 'node_modules/**' ],
include: [
'src/**',
'node_modules/@awaitbox/**'
],
})),
However, in that example, 'node_modules/@awaitbox/**'
won't be included, because the exclude: [ 'node_modules/**' ],
is more powerful. Trying to figure out how...
Look here for options.include and options.exclude: https://github.com/rollup/rollup/wiki/Plugins#conventions
I tried various sorts of !()
patterns, but I couldn't get it to work, so, no update, sorry. I ended up switching to Webpack, it just works in like every case, and is highly maintained.
Ahah!!!!! After switching to Webpack, I was able to use webpack-rollup-loader
to get it to simply work, no more endless (and pointless) fiddling with include
/exclude
for Rollup plugins.
So my config looks like this: https://github.com/erikdesjardins/webpack-rollup-loader/issues/15#issue-288317827 (just mind that if you use Babel, you might get that error mentioned there, which is easy to fix by injecting a pointless line into the problematic file).
This to me proves that Rollup's resolution of node_modules is just not working. I literally tried everything I could, which spawned me to make this PR which I didn't even actually test because it was too complicated, better just switching to Webpack.
Then I discovered that rollup-loader just works, using Webpack's node module resultion instead!
Ah, crap, well, Rollup is still giving me problems. Webpack-only it is!
We're moving this plugin to https://github.com/rollup/plugins where it'll get some TLC. Keep an eye out for this repo being archived and @rollup/plugin-images
.
There are conflicts while using
together because both try to import an svg:
import svg from './svg/svg.svg