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