forked from Doenet/DoenetTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
31 lines (30 loc) · 887 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
import { defineConfig } from 'rollup';
import alias from '@rollup/plugin-alias';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import { terser } from 'rollup-plugin-terser';
export default defineConfig({
input: 'src/Core/Core.js',
plugins: [
alias({
entries: [
{ find: '@Tool', replacement: 'src/Tools/_framework/Tool' },
{ find: '@Toast', replacement: 'src/Tools/_framework/Toast' },
{ find: 'solid-svg', replacement: '@fortawesome/free-solid-svg-icons' },
],
}),
nodeResolve({
preferBuiltins: true,
browser: true,
}),
commonjs({ transformMixedEsModules: true }),
nodePolyfills(),
terser(),
],
output: {
file: 'src/Viewer/core.js',
format: 'iife',
name: 'Core',
},
});