-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathrollup.dev.config.js
More file actions
42 lines (39 loc) · 1.07 KB
/
rollup.dev.config.js
File metadata and controls
42 lines (39 loc) · 1.07 KB
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
36
37
38
39
40
41
42
import PackageJSON from "./package.json" assert { type: "json" }
import alias from "@rollup/plugin-alias"
import babel from "@rollup/plugin-babel"
import commonjs from "@rollup/plugin-commonjs"
import resolve from "@rollup/plugin-node-resolve"
import replace from "@rollup/plugin-replace"
import liveReload from "rollup-plugin-livereload"
import nodePolyfills from "rollup-plugin-polyfill-node"
import serve from "rollup-plugin-serve"
const extensions = [".js", ".ts"]
export default {
input: "src/main.ts",
output: {
file: "dist-local/esm/main.js",
name: "bsp",
inlineDynamicImports: true,
sourcemap: true,
format: "es",
},
plugins: [
alias({
entries: [{ find: "imsc", replacement: "smp-imsc" }],
}),
replace({
preventAssignment: true,
__VERSION__: () => PackageJSON.version,
}),
resolve({ extensions, preferBuiltins: false }),
commonjs(),
nodePolyfills(),
babel({ extensions, babelHelpers: "bundled" }),
serve({
open: true,
}),
liveReload({
watch: ["index.html", "dist-local"],
}),
],
}