Skip to content

Commit

Permalink
Fix rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin committed Sep 25, 2024
1 parent 2cbe5c2 commit 6be6f27
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/typespec-vscode/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import typescript from "@rollup/plugin-typescript";

import { defineConfig } from "rollup";

const plugins = [(resolve as any)({ preferBuiltins: true }), (commonjs as any)()];
const baseConfig = defineConfig({
input: "src/extension.ts",
output: {
Expand All @@ -13,11 +14,6 @@ const baseConfig = defineConfig({
exports: "named",
},
external: ["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
Expand All @@ -42,6 +38,7 @@ export default defineConfig([
exports: "named",
inlineDynamicImports: true,
},
plugins: [...plugins, ts("dist/src")],
},
{
...baseConfig,
Expand All @@ -52,6 +49,7 @@ export default defineConfig([
sourcemap: true,
inlineDynamicImports: true,
},
plugins: [...plugins, ts("dist/src/web")],
},
{
...baseConfig,
Expand All @@ -62,5 +60,10 @@ export default defineConfig([
sourcemap: true,
inlineDynamicImports: true,
},
plugins: [...plugins, ts("dist/test")],
},
]);

function ts(outDir: string) {
return (typescript as any)({ tsconfig: "./tsconfig.build.json", outDir });
}

0 comments on commit 6be6f27

Please sign in to comment.