mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-18 21:57:19 +02:00
Fix production client bundle exports
This commit is contained in:
@@ -3,7 +3,7 @@ import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import { createRequire } from "node:module";
|
import { createRequire } from "node:module";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { defineConfig, normalizePath } from "vite";
|
import { defineConfig, normalizePath } from "vite-plus";
|
||||||
import { viteStaticCopy } from "vite-plugin-static-copy";
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
||||||
import svgr from "vite-plugin-svgr";
|
import svgr from "vite-plugin-svgr";
|
||||||
import topLevelAwait from "vite-plugin-top-level-await";
|
import topLevelAwait from "vite-plugin-top-level-await";
|
||||||
@@ -42,12 +42,15 @@ export default defineConfig(async () => {
|
|||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: "../../dist/apps/yaak-client",
|
outDir: "../../dist/apps/yaak-client",
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
output: {
|
output: {
|
||||||
// Make chunk names readable
|
// Make chunk names readable
|
||||||
chunkFileNames: "assets/chunk-[name]-[hash].js",
|
chunkFileNames: "assets/chunk-[name]-[hash].js",
|
||||||
entryFileNames: "assets/entry-[name]-[hash].js",
|
entryFileNames: "assets/entry-[name]-[hash].js",
|
||||||
assetFileNames: "assets/asset-[name]-[hash][extname]",
|
assetFileNames: "assets/asset-[name]-[hash][extname]",
|
||||||
|
// Vite-Plus/Rolldown 0.1.20 can emit a stale minified export for style-mod,
|
||||||
|
// which breaks CodeMirror MergeView in production builds.
|
||||||
|
minifyInternalExports: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user