feat(vite): add basic vendor chunking and vizualizer plugins
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
// BETTERER RESULTS V2.
|
||||
//
|
||||
//
|
||||
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
|
||||
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
|
||||
//
|
||||
|
||||
@@ -217,6 +217,7 @@
|
||||
"react-select-event": "5.5.1",
|
||||
"redux-mock-store": "1.5.5",
|
||||
"rimraf": "6.0.1",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"rudder-sdk-js": "2.48.44",
|
||||
"sass": "1.83.4",
|
||||
"smtp-tester": "^2.1.0",
|
||||
|
||||
+9
-2
@@ -3,7 +3,8 @@ import { move, remove } from 'fs-extra';
|
||||
import { createRequire } from 'node:module';
|
||||
import { resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { defineConfig, splitVendorChunkPlugin, type PluginOption } from 'vite';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
@@ -25,7 +26,13 @@ export default defineConfig({
|
||||
host: '0.0.0.0',
|
||||
port: 5173,
|
||||
},
|
||||
plugins: [react(), angularHtmlImport(), { ...moveAssets(), apply: 'build' }],
|
||||
plugins: [
|
||||
react(),
|
||||
splitVendorChunkPlugin(),
|
||||
angularHtmlImport(),
|
||||
{ ...moveAssets(), apply: 'build' },
|
||||
{ ...visualizer(), apply: 'build' } as PluginOption,
|
||||
],
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'monaco-editor/esm/vs/editor/editor.worker',
|
||||
|
||||
@@ -18480,6 +18480,7 @@ __metadata:
|
||||
regenerator-runtime: "npm:0.14.1"
|
||||
reselect: "npm:5.1.1"
|
||||
rimraf: "npm:6.0.1"
|
||||
rollup-plugin-visualizer: "npm:^5.12.0"
|
||||
rudder-sdk-js: "npm:2.48.44"
|
||||
rxjs: "npm:7.8.1"
|
||||
sass: "npm:1.83.4"
|
||||
@@ -27357,6 +27358,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-visualizer@npm:^5.12.0":
|
||||
version: 5.12.0
|
||||
resolution: "rollup-plugin-visualizer@npm:5.12.0"
|
||||
dependencies:
|
||||
open: "npm:^8.4.0"
|
||||
picomatch: "npm:^2.3.1"
|
||||
source-map: "npm:^0.7.4"
|
||||
yargs: "npm:^17.5.1"
|
||||
peerDependencies:
|
||||
rollup: 2.x || 3.x || 4.x
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
bin:
|
||||
rollup-plugin-visualizer: dist/bin/cli.js
|
||||
checksum: 10/47358feb672291d6edcfd94197577c192a84c24cb644119425dae8241fb6f5a52556efd0c501f38b276c07534642a80c0885ef681babb474e83c7b5a3b475b84
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup@npm:^4.2.0":
|
||||
version: 4.28.1
|
||||
resolution: "rollup@npm:4.28.1"
|
||||
|
||||
Reference in New Issue
Block a user