rollup-loader
rollup-loader copied to clipboard
should set the rollup options: external: null as default
As rollup document pointer: https://github.com/rollup/rollup/wiki/JavaScript-API#external
external should be : - function: the param when called is the moduleName - array: a list of moduleName
Please notice: external is something refered to moduleName not containing the ext, for example
we write
import './foo'
the moduleName is ./foo
and also i has debug the rollup source , it actually act as above, you can see it @Bundle.js/fetchAllDependencies.
So in the rollup loader , you shouldn't judge a module is an external-module by the ext. As default you set external: RegExp().test.bind(/^(.(?!\.(js|es|es6)$))*$/)
which leads to that rollup only process the only js file. But when we use the rollup loader, we just want a bundle not a single file transpiled by babel, so I suggest do non't set the external option.