forked from cloudscape-design/chat-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.dev-pages.mjs
More file actions
30 lines (27 loc) · 820 Bytes
/
vite.config.dev-pages.mjs
File metadata and controls
30 lines (27 loc) · 820 Bytes
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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
const __dirname = dirname(fileURLToPath(import.meta.url));
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react({ fastRefresh: false })],
resolve: {
alias: {
lodash: "lodash-es",
},
},
build: {
lib: {
entry: resolve(__dirname, "pages/main.tsx"),
name: "ChatComponentsDevPages",
fileName: "main",
},
outDir: "lib/dev-pages/bundle",
rollupOptions: {
external: [/(?:\.\.\/)+?lib\/components/, /^@cloudscape-design\/(?!build-tools)/, "react"],
},
},
});