-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
35 lines (32 loc) · 1007 Bytes
/
rollup.config.js
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
27
28
29
30
31
32
33
34
35
import babel from 'rollup-plugin-babel';
import filesize from 'rollup-plugin-filesize';
import resolve from 'rollup-plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from "rollup-plugin-terser";
import path from 'path';
import pkg from './package.json';
export default {
input: 'resources/js/index.js',
output: {
name: 'BladeXLoader',
file: path.resolve('publishable', 'js', 'app.js'),
format: 'iife',
},
plugins: [
replace({
"process.env.NODE_ENV": "'production'",
"process.env.PKG_VERSION": `"${pkg.version}"`
}),
resolve(),
filesize(),
babel({
exclude: 'node_modules/**',
plugins: ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-classes"]
}),
commonjs({
include: 'node_modules/**', // Default: undefined
}),
terser()
]
}