replace __VERSION__ with a string definition
This commit is contained in:
parent
e0e33a88db
commit
d7a55a165f
@ -30,7 +30,7 @@ export default {
|
||||
external: builtins,
|
||||
plugins: [
|
||||
replace({
|
||||
__VERSION__: printedVersion,
|
||||
__VERSION__: `"${printedVersion}"`,
|
||||
}),
|
||||
|
||||
nodeResolve({
|
||||
|
@ -160,8 +160,9 @@ function applyVerbose(verbose: boolean): void {
|
||||
// TODO
|
||||
}
|
||||
|
||||
declare const __VERSION__: string;
|
||||
function printVersion(): void {
|
||||
console.log("__VERSION__");
|
||||
console.log(__VERSION__);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,11 @@ const nodeEntryPoint = {
|
||||
|
||||
sourcemaps(),
|
||||
replace({
|
||||
'__VERSION__': `"${pkg.version}"`,
|
||||
'__GIT_HASH__': `"${GIT_HASH}"`,
|
||||
values: {
|
||||
'__VERSION__': `"${pkg.version}"`,
|
||||
'__GIT_HASH__': `"${GIT_HASH}"`,
|
||||
},
|
||||
preventAssignment: false,
|
||||
}),
|
||||
|
||||
commonjs({
|
||||
|
Loading…
Reference in New Issue
Block a user