We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0da652 commit 62c9e6cCopy full SHA for 62c9e6c
packages/create-react-native-library/templates/tools/vite/example/vite.config.mjs
@@ -1,15 +1,15 @@
1
-import { fileURLToPath } from 'node:url';
2
-
3
import { defineConfig, mergeConfig } from 'vite';
4
5
-import bobConfig from 'react-native-builder-bob/vite-config';
+import config from 'react-native-builder-bob/vite-config';
+import pack from '../package.json' with { type: 'json' };
6
7
export default defineConfig((env) =>
8
- mergeConfig(bobConfig(env), {
+ mergeConfig(config(env), {
9
resolve: {
10
alias: {
11
- '<%- project.slug -%>': fileURLToPath(new URL('..', import.meta.url)),
+ '<%- project.slug -%>': new URL('..', import.meta.url),
12
},
+ dedupe: Object.keys(pack.peerDependencies),
13
14
})
15
);
0 commit comments