So I need to set the alternative to Rollup's external option (external: path => /^three/.test( path )) in Webpack
As I understand in webpack it's called externals, but I don't know how to set it in extend (config, ctx) {} in nuxt.config.js.
config.module.externals = /^three/ doesn't seem to work, even though in webpack docs I've seen this example:
module.exports = {
//...
externals: /^(jquery|\$)$/i
};
My config in nuxt.config.js:
/*
** You can extend webpack config here
*/
extend (config, ctx) {
config.module.rules.push(
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: 'raw-loader'
}
)
}