Skip to content

Commit b047784

Browse files
committed
Refine config
1 parent f3a7214 commit b047784

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

vite.config.dev-pages.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ import { defineConfig } from "vite";
88

99
const __dirname = dirname(fileURLToPath(import.meta.url));
1010

11-
const componentsPath = resolve(__dirname, "lib/components");
12-
13-
const globals = { [componentsPath]: "components", react: "React" };
14-
1511
// https://vitejs.dev/config/
1612
export default defineConfig({
1713
plugins: [react({ fastRefresh: false })],
@@ -23,10 +19,7 @@ export default defineConfig({
2319
},
2420
outDir: "lib/dev-pages/bundle",
2521
rollupOptions: {
26-
external: [...Object.keys(globals), /^@cloudscape-design\/*/],
27-
output: {
28-
globals,
29-
},
22+
external: [/(?:\.\.\/)+?lib\/components/, /^@cloudscape-design\//, "react"],
3023
},
3124
},
3225
});

0 commit comments

Comments
 (0)