-
Notifications
You must be signed in to change notification settings - Fork 8
/
rollup.config.js
35 lines (34 loc) · 996 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 rust from "@wasm-tool/rollup-plugin-rust";
//import { terser } from "rollup-plugin-terser";
//const copy = require("./rollup-plugin-copy/index.js");
//import zip from "rollup-plugin-zip";
export default {
input: {
sidebar: "src/sidebar/Cargo.toml",
background: "src/background/Cargo.toml",
options: "src/options/Cargo.toml",
},
output: {
dir: "static/js",
format: "esm",
sourcemap: true,
// TODO source map URL is missing the js/
//entryFileNames: "js/[name].js",
},
plugins: [
rust({
//outDir: "static/js",
serverPath: "js/",
importHook: function (path) {
return "browser.runtime.getURL(" + JSON.stringify(path) + ")";
},
}),
//terser(),
/*copy({
assets: ["static"],
}),*/
/*zip({
file: "tab-organizer.zip",
}),*/
],
};