Skip to content
Snippets Groups Projects
Commit 0e34d976 authored by Alexander Rose's avatar Alexander Rose
Browse files

use version from package.json for plugin

parent 2d6cd4c6
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,11 @@
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
export const PLUGIN_VERSION = '0.6.0';
/** version from package.json, to be filled in at bundle build time */
declare const __VERSION__: string
export const PLUGIN_VERSION = __VERSION__;
/** unix time stamp, to be filled in at bundle build time */
declare const __PLUGIN_VERSION_TIMESTAMP__: number
export const PLUGIN_VERSION_TIMESTAMP = __PLUGIN_VERSION_TIMESTAMP__;
declare const __VERSION_TIMESTAMP__: number
export const PLUGIN_VERSION_TIMESTAMP = __VERSION_TIMESTAMP__;
export const PLUGIN_VERSION_DATE = new Date(PLUGIN_VERSION_TIMESTAMP);
\ No newline at end of file
......@@ -36,7 +36,8 @@ const sharedConfig = {
],
}),
new webpack.DefinePlugin({
__PLUGIN_VERSION_TIMESTAMP__: webpack.DefinePlugin.runtimeValue(() => `${new Date().valueOf()}`, true),
__VERSION__: JSON.stringify(require('./package.json').version),
__VERSION_TIMESTAMP__: webpack.DefinePlugin.runtimeValue(() => `${new Date().valueOf()}`, true),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG)
}),
new MiniCssExtractPlugin({ filename: 'app.css' })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment