Close #4311
This commit is contained in:
syuilo 2019-02-18 18:50:45 +09:00
parent 522ce67498
commit 532821d503
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -5,7 +5,6 @@
import * as fs from 'fs';
import * as webpack from 'webpack';
import chalk from 'chalk';
import rndstr from 'rndstr';
const { VueLoaderPlugin } = require('vue-loader');
const WebpackOnBuildPlugin = require('on-build-webpack');
//const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
@ -18,7 +17,6 @@ const constants = require('./src/const.json');
const locales = require('./locales');
const meta = require('./package.json');
const version = isProduction ? meta.version : meta.version + '-' + rndstr({ length: 8, chars: '0-9a-z' });
const codename = meta.codename;
const postcss = {
@ -125,7 +123,7 @@ module.exports = {
}),
new WebpackOnBuildPlugin((stats: any) => {
fs.writeFileSync('./built/client/meta.json', JSON.stringify({
version
version: meta.version
}), 'utf-8');
}),
new VueLoaderPlugin(),
@ -133,7 +131,7 @@ module.exports = {
],
output: {
path: __dirname + '/built/client/assets',
filename: `[name].${version}.js`,
filename: `[name].${meta.version}.js`,
publicPath: `/assets/`
},
resolve: {