Skip to content

Commit

Permalink
Set unified and openai deps only for demos that use them. In package.…
Browse files Browse the repository at this point in the history
…json for Codesandbox export (#28531)
  • Loading branch information
GoodDayForSurf authored Dec 13, 2024
1 parent 9b90a29 commit 1ede20b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
8 changes: 6 additions & 2 deletions apps/demos/configs/Angular/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ window.config = {
map: {
'ts': 'npm:plugin-typescript/lib/plugin.js',
'typescript': 'npm:typescript/lib/typescript.js',
'jszip': 'npm:jszip/dist/jszip.min.js',

/* @angular */
'@angular/compiler': 'bundles:@angular/compiler.umd.js',
Expand Down Expand Up @@ -186,17 +187,20 @@ window.config = {
return acc;
}, {}),

/* Bundles for Unified */
/** unified */
'unified': 'externals:unified/unified.bundle.js',
'remark-parse': 'externals:unified/remark-parse.bundle.js',
'remark-rehype': 'externals:unified/remark-rehype.bundle.js',
'remark-stringify': 'externals:unified/remark-stringify.bundle.js',
'rehype-parse': 'externals:unified/rehype-parse.bundle.js',
'rehype-remark': 'externals:unified/rehype-remark.bundle.js',
'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js',
/**/

/** openai */
'openai': 'externals:openai.bundle.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
/**/

'tslib': 'npm:tslib/tslib.js',
'rxjs': 'npm:rxjs/dist/bundles/rxjs.umd.js',
'rxjs/operators': 'npm:rxjs/dist/cjs/operators/index.js',
Expand Down
8 changes: 6 additions & 2 deletions apps/demos/configs/React/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ window.config = {
map: {
'ts': 'npm:plugin-typescript/lib/plugin.js',
'typescript': 'npm:typescript/lib/typescript.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
'react': 'npm:react/umd/react.development.js',
'react-dom': 'npm:react-dom/umd/react-dom.development.js',
'prop-types': 'npm:prop-types/prop-types.js',
Expand Down Expand Up @@ -121,17 +122,20 @@ window.config = {
'devextreme': 'npm:devextreme/cjs',
'devextreme-react': 'npm:devextreme-react/cjs',

/* Bundles for Unified */
/** unified */
'unified': 'externals:unified/unified.bundle.js',
'remark-parse': 'externals:unified/remark-parse.bundle.js',
'remark-rehype': 'externals:unified/remark-rehype.bundle.js',
'remark-stringify': 'externals:unified/remark-stringify.bundle.js',
'rehype-parse': 'externals:unified/rehype-parse.bundle.js',
'rehype-remark': 'externals:unified/rehype-remark.bundle.js',
'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js',
/**/

/** openai */
'openai': 'externals:openai.bundle.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
/**/

'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js',
'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js',
'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js',
Expand Down
11 changes: 9 additions & 2 deletions apps/demos/configs/ReactJs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,24 @@ window.config = {
'devextreme': 'npm:devextreme/cjs',
'devextreme-react': 'npm:devextreme-react/cjs',

/* Unified bundles */
/** jszip */
'jszip': 'npm:jszip/dist/jszip.min.js',
/**/

/** unified */
'unified': 'externals:unified/unified.bundle.js',
'remark-parse': 'externals:unified/remark-parse.bundle.js',
'remark-rehype': 'externals:unified/remark-rehype.bundle.js',
'remark-stringify': 'externals:unified/remark-stringify.bundle.js',
'rehype-parse': 'externals:unified/rehype-parse.bundle.js',
'rehype-remark': 'externals:unified/rehype-remark.bundle.js',
'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js',
/**/

/** openai */
'openai': 'externals:openai.bundle.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
/**/

'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js',
'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js',
'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js',
Expand Down
8 changes: 6 additions & 2 deletions apps/demos/configs/Vue/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ window.config = {
'@vue/shared': 'npm:@vue/shared/dist/shared.cjs.prod.js',
'vue-loader': 'npm:dx-systemjs-vue-browser/index.js',
'demo-ts-loader': 'project:utils/demo-ts-loader.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
'svg-loader': 'project:utils/svg-loader.js',

/** signalr */
Expand Down Expand Up @@ -120,17 +121,20 @@ window.config = {
'devextreme': 'npm:devextreme/cjs',
'devextreme-vue': 'npm:devextreme-vue/cjs',

/* Bundles for Unified */
/** unified */
'unified': 'externals:unified/unified.bundle.js',
'remark-parse': 'externals:unified/remark-parse.bundle.js',
'remark-rehype': 'externals:unified/remark-rehype.bundle.js',
'remark-stringify': 'externals:unified/remark-stringify.bundle.js',
'rehype-parse': 'externals:unified/rehype-parse.bundle.js',
'rehype-remark': 'externals:unified/rehype-remark.bundle.js',
'rehype-stringify': 'externals:unified/rehype-stringify.bundle.js',
/**/

/** openai */
'openai': 'externals:openai.bundle.js',
'jszip': 'npm:jszip/dist/jszip.min.js',
/**/

'devextreme-quill': 'npm:devextreme-quill/dist/dx-quill.min.js',
'devexpress-diagram': 'npm:devexpress-diagram/dist/dx-diagram.js',
'devexpress-gantt': 'npm:devexpress-gantt/dist/dx-gantt.js',
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/menuMeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@
"Title": "AI and Chatbot Integration",
"Name": "AIAndChatbotIntegration",
"Widget": "Chat",
"Modules": "html-react-parser",
"Modules": "html-react-parser,openai,unified",
"DemoType": "Web"
}
]
Expand Down Expand Up @@ -5851,4 +5851,4 @@
}
]
}
]
]

0 comments on commit 1ede20b

Please sign in to comment.