mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-11 14:10:06 +01:00
30 lines
No EOL
828 B
JavaScript
30 lines
No EOL
828 B
JavaScript
// noinspection JSUnusedGlobalSymbols,JSCheckFunctionSignatures
|
|
|
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
import {getBabelOutputPlugin} from '@rollup/plugin-babel';
|
|
import {terser} from 'rollup-plugin-terser';
|
|
|
|
const output = (name) => {
|
|
return {
|
|
input: `js/${name}.js`,
|
|
output: [
|
|
{
|
|
file: `public/assets/bundle/${name}.js`,
|
|
format: 'esm'
|
|
},
|
|
{
|
|
file: `public/assets/bundle/${name}.min.js`,
|
|
format: 'esm',
|
|
plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] }), terser()],
|
|
sourcemap: true
|
|
}
|
|
],
|
|
plugins: [nodeResolve()]
|
|
}
|
|
};
|
|
|
|
export default [
|
|
output('generic'),
|
|
output('archive'),
|
|
output('user_profile')
|
|
]; |