Skip to content

Commit

Permalink
Fix externals
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUltDev committed May 10, 2024
1 parent 1878494 commit 57c43c6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 19 deletions.
12 changes: 12 additions & 0 deletions toolkit/bundler/src/lib/design.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ export default defineConfig(env => mergeConfig(
output: {
chunkFileNames: 'chunks/[hash]/[name].js',
},
external: [
/* React */
'react',
'react-dom',
'react-native',
'react-native-web',
'react/jsx-runtime',
/* I18n */
'@linguijs/core',
'@linguijs/react',
'@linguijs/macro',
],
},
},
plugins: [
Expand Down
12 changes: 12 additions & 0 deletions toolkit/bundler/src/lib/exo.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ export default defineConfig(env => mergeConfig(
output: {
chunkFileNames: 'chunks/[hash]/[name].js'
},
external: [
/* React */
'react',
'react-dom',
'react-native',
'react-native-web',
'react/jsx-runtime',
/* I18n */
'@linguijs/core',
'@linguijs/react',
'@linguijs/macro',
],
},
},
plugins: [
Expand Down
17 changes: 14 additions & 3 deletions toolkit/bundler/src/lib/exo.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,25 @@ export default defineConfig(env => mergeConfig(
}
},
rollupOptions: {
output: {
chunkFileNames: 'chunks/[hash]/[name].js'
},
external: [
/* React */
'react',
'react-dom',
'react-native',
'react-native-web',
'react/jsx-runtime',
/* I18n */
'@linguijs/core',
'@linguijs/react',
'@linguijs/macro',
/* Vendor */
'@vidstack/react',
'@dotlottie/common',
'@dotlottie/react-player'
],
output: {
chunkFileNames: 'chunks/[hash]/[name].js'
},
},
},
optimizeDeps: {
Expand Down
16 changes: 0 additions & 16 deletions toolkit/bundler/src/vite.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@ import {defineConfig} from 'vite';
import paths from 'vite-tsconfig-paths';

export default defineConfig(env => ({
build: {
rollupOptions: {
external: [
/* React */
'react',
'react-dom',
'react-native',
'react-native-web',
'react/jsx-runtime',
/* I18n */
'@linguijs/core',
'@linguijs/react',
'@linguijs/macro',
],
},
},
define: {
__DEV__: JSON.stringify(env.mode === 'development'),
},
Expand Down

0 comments on commit 57c43c6

Please sign in to comment.