blob: 56e7e972020a1298f0e6778f393b98dab9314d3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
const commonjs = require('rollup-plugin-commonjs');
const babel = require('rollup-plugin-babel');
const glob = require('glob');
module.exports = glob.sync(
'content/frontend/bundles/*.js',
).map(file => ({
input: file,
output: {
file: mapDirectory(file),
format: 'iife',
name: file,
},
plugins: [
commonjs(),
babel({
exclude: 'node_modules/**',
babelrc: false,
presets: ["@babel/preset-env"],
}),
]
}));
function mapDirectory(file) {
return file.replace('content/', 'public/');
}
|