udpate: vite config updated to use updated import paths

This commit is contained in:
Deepen Timalsina 2025-04-14 21:46:44 +05:45
parent 896c7c99d7
commit 61242a44d6

View file

@ -49,12 +49,12 @@ export default defineConfig(({ mode }) => {
find: /^@excalidraw\/excalidraw$/, find: /^@excalidraw\/excalidraw$/,
replacement: path.resolve( replacement: path.resolve(
__dirname, __dirname,
"../packages/excalidraw/index.tsx", "../packages/excalidraw/src/index.tsx",
), ),
}, },
{ {
find: /^@excalidraw\/excalidraw\/(.*?)/, find: /^@excalidraw\/excalidraw\/(.*?)/,
replacement: path.resolve(__dirname, "../packages/excalidraw/$1"), replacement: path.resolve(__dirname, "../packages/excalidraw/src/$1"),
}, },
{ {
find: /^@excalidraw\/math$/, find: /^@excalidraw\/math$/,
@ -95,7 +95,7 @@ export default defineConfig(({ mode }) => {
// or fallback hence not clubbing with locales so first load followed by offline mode works fine. This is how CRA used to work too. // or fallback hence not clubbing with locales so first load followed by offline mode works fine. This is how CRA used to work too.
manualChunks(id) { manualChunks(id) {
if ( if (
id.includes("packages/excalidraw/locales") && id.includes("packages/excalidraw/src/locales") &&
id.match(/en.json|percentages.json/) === null id.match(/en.json|percentages.json/) === null
) { ) {
const index = id.indexOf("locales/"); const index = id.indexOf("locales/");