|
|
@@ -1,16 +1,15 @@
|
|
|
const path = require('path');
|
|
|
const fs = require('fs');
|
|
|
-const UploadPlugin = require('./upload');
|
|
|
let publicPath;
|
|
|
switch (process.env.NODE_ENV) {
|
|
|
case 'development':
|
|
|
publicPath = '/';
|
|
|
break;
|
|
|
case 'production':
|
|
|
- publicPath = `https://cosmoscdn.9space.vip/www/` + new Date().getTime();
|
|
|
+ publicPath = '/9th/';
|
|
|
break;
|
|
|
case 'test':
|
|
|
- publicPath = `https://cosmoscdn.9space.vip/www_test/` + new Date().getTime();
|
|
|
+ publicPath = '/9th/';
|
|
|
break;
|
|
|
}
|
|
|
module.exports = {
|
|
|
@@ -26,9 +25,6 @@ module.exports = {
|
|
|
}
|
|
|
},
|
|
|
chainWebpack: config => {
|
|
|
- if (process.env.NODE_ENV === 'production') {
|
|
|
- config.plugin('upload').use(new UploadPlugin(publicPath.replace('https://cosmoscdn.9space.vip/', '')));
|
|
|
- }
|
|
|
config.output.filename('[name].[hash].js').end();
|
|
|
config.resolve.alias.set('@assets', path.resolve(__dirname, 'src', 'assets', process.env.ASSETS_PATH || '9th'));
|
|
|
config.plugin('html').tap(args => {
|