mirror of https://github.com/GooseMod/GooseMod
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
646 B
35 lines
646 B
3 years ago
|
import localResolve from 'rollup-plugin-local-resolve';
|
||
|
import { terser } from 'rollup-plugin-terser';
|
||
|
|
||
|
import serve from 'rollup-plugin-serve';
|
||
|
|
||
|
const prod = !process.env.ROLLUP_WATCH;
|
||
|
|
||
|
export default {
|
||
|
input: './src/index.js',
|
||
|
|
||
|
output: {
|
||
|
file: './dist/index.js',
|
||
|
format: 'iife',
|
||
|
name: 'goosemod',
|
||
|
sourcemap: false,
|
||
|
|
||
|
freeze: false /* do not freeze exports */
|
||
|
},
|
||
|
|
||
|
plugins: [
|
||
|
localResolve(),
|
||
|
prod && terser(),
|
||
|
|
||
|
!prod && serve({
|
||
|
contentBase: 'dist',
|
||
|
port: 1234,
|
||
|
headers: {
|
||
|
'Access-Control-Allow-Origin': '*',
|
||
|
}
|
||
|
})
|
||
|
],
|
||
|
|
||
|
// fix rollup jank
|
||
|
inlineDynamicImports: true
|
||
|
};
|