diff --git a/visualdl/frontend/package.json b/visualdl/frontend/package.json index ccdf968495c001931739aa0a369765b82a829898..d6115a19b91d55c75e848a76be89da2164b86c08 100644 --- a/visualdl/frontend/package.json +++ b/visualdl/frontend/package.json @@ -8,7 +8,6 @@ "release": "cross-env NODE_ENV=production node ./tool/build.js", "build": "cross-env NODE_ENV=dev node ./tool/build.js", "dev": "cross-env NODE_ENV=dev node tool/dev-server.js", - "analyzer": "npm run release -- analyzer", "lint": "./node_modules/fecs/bin/fecs --rule", "precommit": "npm run lint", "prepush": "npm run lint" @@ -18,21 +17,14 @@ }, "dependencies": { "axios": "^0.16.1", - "dom-align": "^1.5.3", "file-saver": "^1.3.3", "lodash": "^4.17.4", - "lodash.debounce": "^4.0.8", - "lodash.merge": "^4.6.0", - "lodash.omit": "^4.5.0", - "lodash.throttle": "^4.1.1", "normalize.css": "^6.0.0", - "qs": "^6.5.1", "san": "3.2.3", "san-mui": "^1.0.4", "san-router": "^1.1.1", "san-store": "^1.0.1", "san-update": "^2.1.0", - "text-encoding": "^0.6.4", "xlsx": "^0.11.3" }, "devDependencies": { @@ -44,22 +36,16 @@ "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "^6.18.0", "babel-preset-stage-0": "^6.16.0", - "babel-preset-stage-2": "^6.0.0", "babel-register": "^6.0.0", "babel-runtime": "^6.26.0", "case-sensitive-paths-webpack-plugin": "^2.1.1", "chalk": "^1.1.3", - "connect-history-api-fallback": "^1.1.0", "copy-webpack-plugin": "^4.0.1", "cross-env": "^4.0.0", "css-loader": "^0.28.0", - "ejs-render-loader": "^1.0.0", - "empty-module": "0.0.2", - "eventsource-polyfill": "^0.9.6", "extract-text-webpack-plugin": "^2.1.0", "fecs": "^1.5.2", "file-loader": "^0.11.1", - "font-awesome": "^4.7.0", "friendly-errors-webpack-plugin": "^1.6.1", "glob": "^7.1.1", "html-loader": "^0.4.4", @@ -72,14 +58,12 @@ "ora": "^1.1.0", "postcss-loader": "^1.3.3", "raw-loader": "^0.5.1", - "rider": "^2.0.0", "san-loader": "^0.0.4", "style-loader": "^0.16.1", "stylus": "^0.54.5", "stylus-loader": "^3.0.1", "url-loader": "^0.5.8", "webpack": "^2.4.1", - "webpack-bundle-analyzer": "^2.8.2", "webpack-dev-server": "^2.4.2", "webpack-hot-middleware": "^2.19.1", "webpack-merge": "^4.1.0", diff --git a/visualdl/frontend/tool/dev-client.js b/visualdl/frontend/tool/dev-client.js deleted file mode 100644 index 89f0079515de1f2c64af8bbf8fbe835a0166bae5..0000000000000000000000000000000000000000 --- a/visualdl/frontend/tool/dev-client.js +++ /dev/null @@ -1,8 +0,0 @@ -require('eventsource-polyfill') -var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') - -hotClient.subscribe(function (event) { - if (event.action === 'reload') { - window.location.reload() - } -}) diff --git a/visualdl/frontend/tool/dev-server.js b/visualdl/frontend/tool/dev-server.js index ea8c7c5e73ff3a688a927d8a8236b1ebc277debe..f86feb1f5751fa3fc6bc6335dcf783eb3716ccb9 100644 --- a/visualdl/frontend/tool/dev-server.js +++ b/visualdl/frontend/tool/dev-server.js @@ -38,9 +38,6 @@ compiler.plugin('compilation', function (compilation) { }); }); -// handle fallback for HTML5 history API -app.use(require('connect-history-api-fallback')()); - var context = [ '/example', ]; diff --git a/visualdl/frontend/tool/webpack.config.js b/visualdl/frontend/tool/webpack.config.js index 3b78a1b5d5bc7c333e5450883680e25754b6309b..24764208c456bb784655b5934e7c272782abf101 100644 --- a/visualdl/frontend/tool/webpack.config.js +++ b/visualdl/frontend/tool/webpack.config.js @@ -1,9 +1,7 @@ const webpack = require('webpack'); const path = require('path'); -const rider = require('rider'); const projectPath = path.resolve(__dirname, '..'); const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const argv = require('yargs').argv; const isDev = process.env.NODE_ENV === 'dev'; const entry = require('./entry'); @@ -48,7 +46,6 @@ const config = { alias: { 'san-mui': 'san-mui/lib', - moment: 'moment/min/moment-with-locales.min.js', axios: 'axios/dist/axios.min.js' }, @@ -57,7 +54,6 @@ const config = { module: { noParse: [ - /moment-with-locales/, /node_modules\/(san|axios)\// ], rules: [ @@ -126,21 +122,12 @@ const config = { new CaseSensitivePathsPlugin(), new webpack.LoaderOptionsPlugin({ - test: /\.(styl|san)$/, - stylus: { - default: { - use: [rider()] - } - } + test: /\.(styl|san)$/ }) ] }; // template config config.plugins = config.plugins.concat(ENTR_CONFIG.template); -// analyzer -if (argv.analyzer) { - config.plugins.push(new BundleAnalyzerPlugin()); -} module.exports = config; diff --git a/visualdl/frontend/tool/webpack.dev.config.js b/visualdl/frontend/tool/webpack.dev.config.js index 5b16958fafa422373ac0ba00075de5616d4d97ca..7ddbc3127a82242410d3e12a5082cc045519291a 100644 --- a/visualdl/frontend/tool/webpack.dev.config.js +++ b/visualdl/frontend/tool/webpack.dev.config.js @@ -3,11 +3,6 @@ const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); let merge = require('webpack-merge'); let baseWebpackConfig = require('./webpack.config'); -// add hot-reload related code to entry chunks -Object.keys(baseWebpackConfig.entry).forEach(function (name) { - baseWebpackConfig.entry[name] = ['./tool/dev-client'].concat(baseWebpackConfig.entry[name]); -}); - /** * dev config *