File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 3636 "build:src:environment" : " node scripts/environment" ,
3737 "build:themeable" : " node scripts/themeable-source" ,
3838 "build:pages:vite" : " vite build" ,
39- "build:pages:tsc" : " tsc -p pages/tsconfig.json"
39+ "build:pages:tsc" : " tsc -p pages/tsconfig.json" ,
40+ "build:pages:lib" : " vite build -c vite.config.pages.mjs"
4041 },
4142 "exports" : {
4243 "." : " ./index.js" ,
Original file line number Diff line number Diff line change 1+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+ // SPDX-License-Identifier: Apache-2.0
3+ import { fileURLToPath } from "node:url" ;
4+
5+ import react from "@vitejs/plugin-react" ;
6+ import { defineConfig } from "vite" ;
7+
8+ const componentsPath = fileURLToPath ( new URL ( "lib/components" , import . meta. url ) ) ;
9+
10+ // https://vitejs.dev/config/
11+ export default defineConfig ( {
12+ plugins : [ react ( { fastRefresh : false } ) ] ,
13+ root : "./pages" ,
14+ base : "./" ,
15+ resolve : {
16+ alias : {
17+ lodash : "lodash-es" ,
18+ } ,
19+ } ,
20+ build : {
21+ outDir : "../lib/dev-pages/pages" ,
22+ rollupOptions : {
23+ external : [ componentsPath ] ,
24+ output : {
25+ globals : { componentsPath : "components" } ,
26+ } ,
27+ } ,
28+ } ,
29+ } ) ;
You can’t perform that action at this time.
0 commit comments