You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
878 B
35 lines
878 B
import babel from '@rollup/plugin-babel';
|
|
import {nodeResolve} from '@rollup/plugin-node-resolve';
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
import replace from '@rollup/plugin-replace';
|
|
import css from "@modular-css/rollup";
|
|
import copy from 'rollup-plugin-copy'
|
|
|
|
export default {
|
|
input: 'layouts/scripts/index.js',
|
|
output: {
|
|
file: 'layouts/scripts/dist/index.min.js',
|
|
sourcemap: true
|
|
},
|
|
plugins: [
|
|
nodeResolve({
|
|
extensions: [".js"],
|
|
}),
|
|
replace({
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
preventAssignment: true,
|
|
}),
|
|
css(),
|
|
babel({
|
|
compact: false,
|
|
babelHelpers: 'bundled',
|
|
presets: ["@babel/preset-react"],
|
|
}),
|
|
commonjs(),
|
|
copy({
|
|
targets: [
|
|
{ src: 'layouts/scripts/toolbar/images/**/*', dest: 'layouts/scripts/dist/toolbar/images' }
|
|
]
|
|
})
|
|
],
|
|
}
|
|
|