Does not support rollup experimentalCodeSplitting and rollup experimentalDynamicImport
lanjingling0510 opened this issue · 4 comments
lanjingling0510 commented
Because CodeSplitting has no output.file
option.
Ashot-KR commented
Hi! Could you provide an example(config and usage)? With examples i'll find solution faster
lanjingling0510 commented
This is my configuration.
// rollup.config.js
import path from 'path';
import babel from 'rollup-plugin-babel';
import url from 'rollup-plugin-url';
let publicPath = '/lib/';
export default {
input: [
'src/index.js',
'src/index2.js',
],
experimentalCodeSplitting: true,
experimentalDynamicImport: true,
external: id => /babel-runtime/.test(id),
plugins: [
url({
limit: 5 * 1024, // inline files < 5k, copy files > 10k
include: ['**/*.wasm'], // defaults to .svg, .png, .jpg and .gif files
emitFiles: true, // defaults to true
publicPath: publicPath
}),
babel({
presets: [
[ 'env', {
modules: false,
targets: {
browsers: [ 'last 2 versions', 'not ie <= 8' ],
},
}],
'stage-1',
],
exclude: [
'node_modules/**',
'src/flv2mp4/*.asm.js',
'src/flv2mp4/*.wasm.js',
'src/flv2mp4/*.wasm'
],
plugins: [
'external-helpers',
'transform-runtime',
],
externalHelpers: true,
runtimeHelpers: true,
babelrc: false,
}),
],
output: {
format: 'es',
dir: 'lib'
}
};
Ashot-KR commented
Thanks! I will fix it ASAP
Ashot-KR commented
1.4.0 published on npm