From 75e4ac6e080cc02a397b8213ad6455f4ec29c0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 15 Jul 2018 20:09:40 +0800 Subject: [PATCH] Optimization: delete externals --- .webpackrc.js | 29 +++++++++++++++++++++++++++++ src/index.ejs | 19 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 .webpackrc.js create mode 100644 src/index.ejs diff --git a/.webpackrc.js b/.webpackrc.js new file mode 100755 index 00000000..cf91d6d6 --- /dev/null +++ b/.webpackrc.js @@ -0,0 +1,29 @@ +const path = require('path'); + +export default { + entry: 'src/index.js', + extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]], + env: { + development: { + extraBabelPlugins: ['dva-hmr'], + }, + }, + externals: { + '@antv/data-set': 'DataSet', + rollbar: 'rollbar', + }, + alias: { + components: path.resolve(__dirname, 'src/components/'), + }, + ignoreMomentLocale: true, + theme: './src/theme.js', + html: { + template: './src/index.ejs', + }, + lessLoaderOptions: { + javascriptEnabled: true, + }, + disableDynamicImport: true, + publicPath: '/', + hash: true, +}; diff --git a/src/index.ejs b/src/index.ejs new file mode 100644 index 00000000..6d0be3b7 --- /dev/null +++ b/src/index.ejs @@ -0,0 +1,19 @@ + + + + + + + + Ant Design Pro + + + + + + + +
+ + + \ No newline at end of file -- GitLab