Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
fix: export CleanWebpackPlugin, for johnagan/clean-webpack-plugin#144
Browse files Browse the repository at this point in the history
  • Loading branch information
orzyyyy committed May 30, 2019
1 parent 3758f8f commit ae4ab86
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/Trunk.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Trunk.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="stylesheet" href="./assets/index.css"><style>*{margin:0;padding:0}</style><script src="./assets/plugins/polyfill.min.js"></script><script src="./assets/plugins/fetch.js"></script></head><body><div id="container" class="container"></div><div id="detail" class="detail"></div><div id="timeline" class="timeline">显示等值面</div><div id="refreshPillar" class="refresh-pillar">刷新柱子</div><script type="text/javascript" src="Trunk.js?78c21e3fc8580bb1503d"></script></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="stylesheet" href="./assets/index.css"><style>*{margin:0;padding:0}</style><script src="./assets/plugins/polyfill.min.js"></script><script src="./assets/plugins/fetch.js"></script></head><body><div id="container" class="container"></div><div id="detail" class="detail"></div><div id="timeline" class="timeline">显示等值面</div><div id="refreshPillar" class="refresh-pillar">刷新柱子</div><script type="text/javascript" src="Trunk.js?2b8c3fc2294f8f51d984"></script></body></html>
20 changes: 11 additions & 9 deletions webpack.prod.js
Expand Up @@ -6,7 +6,7 @@
*/
const webpack = require('webpack');
const fs = require('fs');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
// const CopyWebpackPlugin = require('copy-webpack-plugin');
// const TohoLogPlugin = require('toho-log-plugin');
const TohoLogPlugin = require('./plugins/toho-log-plugin');
Expand All @@ -26,20 +26,22 @@ let plugins = commonPlugin;

plugins.push(new TohoLogPlugin({ dev: false }));

plugins.push(new CleanWebpackPlugin(['dist'], {
verbose: false
}));
plugins.push(
new CleanWebpackPlugin({
verbose: false,
}),
);

const options = {
mode: 'production',
devServer: {
port: 9099
port: 9099,
},
resolve: {
extensions: ['.js'],
},
externals: {
'three': 'three'
three: 'three',
},
devtool: 'source-map',
entry: {
Expand All @@ -49,10 +51,10 @@ const options = {
path: __dirname + '/dist',
filename: '[name].js',
chunkFilename: 'vendor/[name].js',
libraryTarget: 'umd'
libraryTarget: 'umd',
},
plugins,
module: commonModule
module: commonModule,
};

webpack(options).run();
webpack(options).run();

0 comments on commit ae4ab86

Please sign in to comment.