Skip to content

Commit

Permalink
Externalize deps as before
Browse files Browse the repository at this point in the history
Signed-off-by: Florent MILLOT <millotflo@gmail.com>
  • Loading branch information
flomillot committed Feb 6, 2024
1 parent 63261ad commit 8a60da5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gridsuite/commons-ui",
"version": "0.43.0",
"version": "0.44.0",
"description": "common react components for gridsuite applications",
"engines": {
"npm": ">=9",
Expand Down Expand Up @@ -91,6 +91,7 @@
"vite": "^5.0.11",
"vite-plugin-dts": "^3.7.1",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-externalize-deps": "^0.8.0",
"vite-plugin-svgr": "^4.2.0",
"yup": "^1.0.0"
},
Expand Down
17 changes: 4 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as fs from 'fs/promises';
import * as url from 'url';
import { createRequire } from 'node:module';
import svgr from 'vite-plugin-svgr';
import { externalizeDeps } from 'vite-plugin-externalize-deps'

export default defineConfig({
plugins: [
Expand All @@ -17,29 +18,19 @@ export default defineConfig({
dts(),
svgr({ include: '**/*.svg' }), // default is { include: "**/*.svg?react" }
reactVirtualized(),
externalizeDeps({
deps: false
}),
],

build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.js'),
name: 'Commons ui',
// the proper extensions will be added
fileName: 'commons-ui',
formats: ['es'],
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['react'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'React',
},
},
},
},
});

Expand Down

0 comments on commit 8a60da5

Please sign in to comment.