-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.dev.js
46 lines (43 loc) · 1.08 KB
/
rollup.dev.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
36
37
38
39
40
41
42
43
44
45
46
import rust from "@wasm-tool/rollup-plugin-rust";
import livereload from "rollup-plugin-livereload";
import serve from "rollup-plugin-serve";
export default {
input: {
index: 'Cargo.toml'
},
output: {
dir: "devhtml/js",
format: "iife",
sourcemap: true,
chunkFileNames: "[name].js",
assetFileNames: "assets/[name][extname]"
},
plugins: [
rust({
serverPath: "/js/",
debug: true,
verbose: true,
watchPatterns: ["src/**"],
cargoArgs: ["--features", "develop"],
}),
serve({
contentBase: 'devhtml',
open: true,
verbose: true,
debug: false,
port: 8189,
headers: {
'Access-Control-Allow-Origin': '*',
"Content-Type": "application/wasm",
},
// historyApiFallback: true,
}),
livereload({
watch: 'devhtml/js',
verbose: true
})
],
watch: {
clearScreen: false
}
};