chore: Add vite support for define

This commit is contained in:
Sidharth Vinod
2023-08-14 09:05:56 +05:30
parent 58a744782a
commit 13a6f04945
3 changed files with 9 additions and 1 deletions

View File

@@ -89,6 +89,10 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
}),
...visualizerOptions(packageName, core),
],
define: {
// Needs to be string
includeLargeDiagrams: 'true',
},
};
if (watch && config.build) {

View File

@@ -1 +1 @@
declare let includeLargeDiagrams: boolean;
declare const includeLargeDiagrams: boolean;

View File

@@ -33,4 +33,8 @@ export default defineConfig({
esmExternals: true,
},
},
define: {
// Needs to be string
includeLargeDiagrams: 'true',
},
});