-
Notifications
You must be signed in to change notification settings - Fork 17
/
rollup.config.js
36 lines (34 loc) · 1.03 KB
/
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
36
// import typescript from "@rollup/plugin-typescript"
import typescript from "rollup-plugin-typescript2"
import { nodeResolve } from "@rollup/plugin-node-resolve"
import { terser } from "rollup-plugin-terser"
import commonjs from "@rollup/plugin-commonjs"
import progress from "rollup-plugin-progress"
import { builtinModules } from "module"
export default {
input: "src/extension.ts", // our source file
output: {
sourcemap: false,
// freeze: false,
// interop: "auto",
// dir: "out",
file: "out/extension.js",
format: "cjs",
},
// external: [...Object.keys(pkg.dependencies || {}), ...builtins],
external: [...builtinModules, "vscode"],
plugins: [
nodeResolve({
preferBuiltins: true,
}),
typescript({
// tsconfig: "./tsconfig.json",
// module: "esnext",
// typescript: require("typescript"),
}),
commonjs({ dynamicRequireTargets: ["*"] }),
terser({ compress: true, mangle: true }),
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
progress(),
],
}