Skip to content

Commit

Permalink
fix: Remove sourcemaps and split vendors plugin to speed up and reduc…
Browse files Browse the repository at this point in the history
…e memory footprint
  • Loading branch information
LautaroPetaccio committed Jan 21, 2025
1 parent 062d695 commit 2d65b03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }]
},
"parserOptions": {
"project": ["./tsconfig.json"]
"project": ["./tsconfig.node.json"]
},
"overrides": [
{
Expand All @@ -47,7 +47,7 @@
"@typescript-eslint/no-unsafe-enum-comparison": "off"
},
"parserOptions": {
"project": ["./tsconfig.json"]
"project": ["./tsconfig.node.json"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"baseUrl": "src"
},
"include": ["src", ".eslintrc.js", "jest.config.ts", "./node_modules/decentraland-builder-scripts/types.d.ts"],
"include": ["src", ".eslintrc.js", "vite.config.ts", "jest.config.ts", "./node_modules/decentraland-builder-scripts/types.d.ts"],
"exclude": ["src/modules/editor/ecs.js", "src/ecsScene/scene.ts", "dist", "node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
}
6 changes: 3 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import react from '@vitejs/plugin-react-swc'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import path from 'path'
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite'
import { defineConfig, loadEnv } from 'vite'

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const envVariables = loadEnv(mode, process.cwd())
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return {
plugins: [react(), nodePolyfills(), splitVendorChunkPlugin()],
plugins: [react(), nodePolyfills()],
// Required because the CatalystClient tries to access it
define: {
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -62,7 +62,7 @@ export default defineConfig(({ mode }) => {
commonjsOptions: {
transformMixedEsModules: true
},
sourcemap: true
sourcemap: false
},
base: envVariables.VITE_BASE_URL
}
Expand Down

0 comments on commit 2d65b03

Please sign in to comment.