added hash to js bundle names (#1803)

main
Andrey Zhavoronkov 6 years ago committed by GitHub
parent 99860d8171
commit db29291d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,10 +60,12 @@ const webConfig = {
target: 'web',
mode: 'production',
devtool: 'source-map',
entry: './src/typescript/canvas.ts',
entry: {
'cvat-canvas': './src/typescript/canvas.ts',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'cvat-canvas.js',
filename: '[name].[contenthash].js',
library: 'canvas',
libraryTarget: 'window',
},

@ -30,10 +30,12 @@ const webConfig = {
target: 'web',
mode: 'production',
devtool: 'source-map',
entry: './src/api.js',
entry: {
'cvat-core': './src/api.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'cvat-core.min.js',
filename: '[name].[contenthash].min.js',
library: 'cvat',
libraryTarget: 'window',
},
@ -58,7 +60,7 @@ const webConfig = {
loader: 'worker-loader',
options: {
publicPath: '/static/engine/js/3rdparty/',
name: '[name].js',
name: '[name].[contenthash].js',
},
},
}, {
@ -68,7 +70,7 @@ const webConfig = {
loader: 'worker-loader',
options: {
publicPath: '/static/engine/js/',
name: '[name].js',
name: '[name].[contenthash].js',
},
},
},

@ -9,10 +9,12 @@ const CopyPlugin = require('copy-webpack-plugin');
const cvatData = {
target: 'web',
mode: 'production',
entry: './src/js/cvat-data.js',
entry: {
'cvat-data': './src/js/cvat-data.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'cvat-data.min.js',
filename: '[name].[contenthash].min.js',
library: 'cvatData',
libraryTarget: 'window',
},
@ -39,7 +41,7 @@ const cvatData = {
loader: 'worker-loader',
options: {
publicPath: '/',
name: '[name].js',
name: '[name].[contenthash].js',
},
},
}, {
@ -48,7 +50,7 @@ const cvatData = {
loader: 'worker-loader',
options: {
publicPath: '/3rdparty/',
name: '3rdparty/[name].js',
name: '3rdparty/[name].[contenthash].js',
},
},
},

@ -15,6 +15,5 @@
<body>
<div id="root"></div>
<script src="/cvat-ui.min.js" type="text/javascript"></script>
</body>
</html>

@ -14,10 +14,13 @@ module.exports = {
target: 'web',
mode: 'production',
devtool: 'source-map',
entry: './src/index.tsx',
entry: {
'cvat-ui': './src/index.tsx',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'cvat-ui.min.js',
filename: '[name].[contenthash].min.js',
publicPath: '/',
},
devServer: {
contentBase: path.join(__dirname, 'dist'),
@ -79,7 +82,7 @@ module.exports = {
loader: 'worker-loader',
options: {
publicPath: '/',
name: '3rdparty/[name].js',
name: '3rdparty/[name].[contenthash].js',
},
},
}, {
@ -89,7 +92,7 @@ module.exports = {
loader: 'worker-loader',
options: {
publicPath: '/',
name: '[name].js',
name: '[name].[contenthash].js',
},
},
},],
@ -97,7 +100,7 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html",
inject: false,
inject: 'body',
}),
new Dotenv({
systemvars: true,

Loading…
Cancel
Save