forked from microsoft/typespec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
33 lines (31 loc) · 922 Bytes
/
rollup.config.ts
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
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import { defineConfig } from "rollup";
export default defineConfig({
input: "src/extension.ts",
output: {
file: "dist/src/extension.cjs",
format: "commonjs",
sourcemap: true,
exports: "named",
inlineDynamicImports: true,
},
external: ["fs/promises", "vscode"],
plugins: [
(resolve as any)({ preferBuiltins: true }),
(commonjs as any)(),
(typescript as any)({ tsconfig: "./tsconfig.build.json" }),
],
onwarn: (warning, warn) => {
if (warning.code === "CIRCULAR_DEPENDENCY") {
// filter out warnings about circular dependencies out of our control
for (const each of ["node_modules/semver"]) {
if (warning.message.includes(each)) {
return;
}
}
}
warn(warning);
},
});