mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
set console asset version as build timestamp (#2742)
This commit is contained in:
parent
3527b085fd
commit
47057989af
@ -20,12 +20,6 @@ const webpackIsomorphicToolsPlugin = new WebpackIsomorphicToolsPlugin(
|
||||
|
||||
// const { UnusedFilesWebpackPlugin } = require('unused-files-webpack-plugin');
|
||||
|
||||
const getRandomHexString = () => {
|
||||
return Math.random()
|
||||
.toString(16)
|
||||
.slice(2);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
@ -155,7 +149,7 @@ module.exports = {
|
||||
}),
|
||||
// set global consts
|
||||
new webpack.DefinePlugin({
|
||||
CONSOLE_ASSET_VERSION: JSON.stringify(getRandomHexString()),
|
||||
CONSOLE_ASSET_VERSION: Date.now().toString(),
|
||||
}),
|
||||
webpackIsomorphicToolsPlugin.development(),
|
||||
],
|
||||
|
@ -22,12 +22,6 @@ const cleanOptions = {
|
||||
dry: false,
|
||||
};
|
||||
|
||||
const getRandomHexString = () => {
|
||||
return Math.random()
|
||||
.toString(16)
|
||||
.slice(2);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
context: path.resolve(__dirname, '..'),
|
||||
@ -193,7 +187,7 @@ module.exports = {
|
||||
// Useful to reduce the size of client-side libraries, e.g. react
|
||||
NODE_ENV: JSON.stringify('production'),
|
||||
},
|
||||
CONSOLE_ASSET_VERSION: JSON.stringify(getRandomHexString()),
|
||||
CONSOLE_ASSET_VERSION: Date.now().toString(),
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user