Answer the question
In order to leave comments, you need to log in
How to force Rollup to assemble assembly in one file?
Good day.
There is Rollup 1.29, there is a simple config. You need to end up with a minified library file.
export default {
input: 'src/index.js',
plugins: [
resolve({
mainFields: ["module", "jsnext:main", "main", "browser"]
}),
vue({
css: true,
}),
babel({
exclude: 'node_modules/**',
babelHelpers: 'runtime',
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.vue'],
}),
cjs(),
replace({
VERSION: JSON.stringify(config.version),
}),
postcss(),
terser(),
analyze(),
],
output: [{
file: 'dist/libdary.min.js',
format: 'es',
}],
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question