Skip to content

Commit

Permalink
chore: Fix reuse of react from entrypoint
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jul 5, 2024
1 parent e428d45 commit 4407421
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 32 deletions.
159 changes: 129 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "AGPL-3.0-or-later",
"private": true,
"type": "module",
"main": "src/main.tsx",
"scripts": {
"build": "vite --mode production build",
"dev": "vite --mode development build",
Expand Down Expand Up @@ -40,7 +41,7 @@
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/vite-config": "^1.3.0",
"@nextcloud/vite-config": "^2.0.2",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vue/tsconfig": "^0.5.1",
Expand Down
13 changes: 12 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ import { createAppConfig } from '@nextcloud/vite-config'
import react from '@vitejs/plugin-react'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import { defineConfig } from 'vite'
import { join, resolve } from 'path'

const AppConfig = createAppConfig({
main: 'src/main.tsx',
main: resolve(join('src', 'main.tsx')),
}, {
config: defineConfig({
build: {
cssCodeSplit: true,
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom'],
},
},
},
},
css: {
modules: {
localsConvention: 'camelCase',
Expand Down

0 comments on commit 4407421

Please sign in to comment.