Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: more vite.config cleanups #1589

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packages/analytics/analytics-chart/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ const config = mergeConfig(sharedViteConfig, defineConfig({
entry: resolve(__dirname, './src/index.ts'),
fileName: (format) => `${sanitizedPackageName}.${format}.js`,
},
rollupOptions: {
// Make sure to externalize deps that shouldn't be bundled into your library
external: ['@kong-ui-public/i18n'],
output: {
// Provide global variables to use in the UMD build for externalized deps
globals: {
'@kong-ui-public/i18n': 'kong-ui-public-i18n',
},
},
},
},
server: {
open: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/analytics-geo-map/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const config = mergeConfig(sharedViteConfig, defineConfig({
},
rollupOptions: {
// Make sure to externalize deps that shouldn't be bundled into your library
external: ['maplibre-gl', '@kong-ui-public/i18n'],
external: ['maplibre-gl'],
output: {
// Provide global variables to use in the UMD build for externalized deps
globals: {
'@kong-ui-public/i18n': 'kong-ui-public-i18n',
'maplibre-gl': 'maplibre-gl',
ValeryG marked this conversation as resolved.
Show resolved Hide resolved
},
},
},
Expand Down
3 changes: 1 addition & 2 deletions packages/analytics/analytics-metric-provider/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const config = mergeConfig(sharedViteConfig, defineConfig({
rollupOptions: {
// Make sure to externalize deps that shouldn't be bundled into your library
external: [
'@kong-ui-public/i18n',
'@kong-ui-public/analytics-config-store',
'@kong-ui-public/analytics-utilities',
'@kong-ui-public/metric-cards',
Expand All @@ -28,9 +27,9 @@ const config = mergeConfig(sharedViteConfig, defineConfig({
output: {
// Provide global variables to use in the UMD build for externalized deps
globals: {
'@kong-ui-public/i18n': 'kong-ui-public-i18n',
'@kong-ui-public/analytics-config-store': 'kong-ui-public-analytics-config-store',
'@kong-ui-public/analytics-utilities': 'kong-ui-public-analytics-utilities',
'@kong-ui-public/metric-cards': '@kong-ui-public/metric-cards',
pinia: 'pinia',
},
},
Expand Down
8 changes: 8 additions & 0 deletions packages/entities/entities-routes/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ const config = mergeConfig(sharedViteConfig, defineConfig({
'@kong-ui-public/expressions/dist/style.css',
'lodash.isequal',
],
output: {
// Provide global variables to use in the UMD build for externalized deps
globals: {
'@kong-ui-public/expressions': '@kong-ui-public/expressions',
'@kong-ui-public/expressions/dist/style.css': '@kong-ui-public/expressions/dist/style.css',
'lodash.isequal': 'lodash.isequal',
ValeryG marked this conversation as resolved.
Show resolved Hide resolved
},
},
},
},
...(process.env.USE_SANDBOX
Expand Down