File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
Expand file tree Collapse file tree 3 files changed +10
-12
lines changed 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 * as chatComponents from "../lib/components" ;
4+
5+ Object . assign ( window as unknown as Record < string , any > , {
6+ chatComponents,
7+ } ) ;
Original file line number Diff line number Diff line change 3737 "build:themeable" : " node scripts/themeable-source" ,
3838 "build:pages:vite" : " vite build" ,
3939 "build:pages:tsc" : " tsc -p pages/tsconfig.json" ,
40- "build:pages:lib" : " vite build -c vite.config.dev-pages.mjs && cp pages/index.html lib/dev-pages "
40+ "build:pages:lib" : " vite build -c vite.config.dev-pages.mjs"
4141 },
4242 "exports" : {
4343 "." : " ./index.js" ,
Original file line number Diff line number Diff line change @@ -10,16 +10,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
1010
1111const chatComponentsPath = resolve ( __dirname , "lib/components" ) ;
1212
13- const globalPackages = {
14- react : "React" ,
15- "react-dom" : "ReactDOM" ,
16- "react/jsx-runtime" : "jsxRuntime" ,
17- "@cloudscape-design/components" : "components" ,
18- "@cloudscape-design/global-styles" : "globalStyles" ,
19- "@cloudscape-design/component-toolkit" : "componentToolkit" ,
20- } ;
21-
22- const globals = { [ chatComponentsPath ] : "chatComponents" , ...globalPackages } ;
13+ const globals = { [ chatComponentsPath ] : "chatComponents" } ;
2314
2415// https://vitejs.dev/config/
2516export default defineConfig ( {
@@ -37,7 +28,7 @@ export default defineConfig({
3728 } ,
3829 outDir : "lib/dev-pages/bundle" ,
3930 rollupOptions : {
40- external : [ chatComponentsPath , ... Object . keys ( globalPackages ) ] ,
31+ external : [ chatComponentsPath ] ,
4132 output : {
4233 globals,
4334 } ,
You can’t perform that action at this time.
0 commit comments