mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-24 09:49:46 +02:00
chore: Fix import.meta.vitest warnings
This commit is contained in:
@@ -8,6 +8,8 @@ const buildType = (packageName: string) => {
|
|||||||
out.length > 0 && console.log(out.toString());
|
out.length > 0 && console.log(out.toString());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
e.stdout.length > 0 && console.error(e.stdout.toString());
|
||||||
|
e.stderr.length > 0 && console.error(e.stderr.toString());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -65,6 +65,9 @@ export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
|
|||||||
minify,
|
minify,
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
chunkNames: `chunks/${outFileName}/[name]-[hash]`,
|
||||||
|
define: {
|
||||||
|
'import.meta.vitest': 'undefined',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (core) {
|
if (core) {
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "../..",
|
"rootDir": "../..",
|
||||||
"outDir": "./dist"
|
"outDir": "./dist",
|
||||||
|
"types": ["vitest/importMeta", "vitest/globals"]
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*.ts"],
|
"include": ["./src/**/*.ts"],
|
||||||
"typeRoots": ["./src/types"]
|
"typeRoots": ["./src/types"]
|
||||||
|
Reference in New Issue
Block a user