Commit 3eb451d7 by caoyanzhi

update: 打包调整

parent 0e8bdb14
......@@ -89,6 +89,13 @@ module.exports = {
}
]
},
externals: {
vue: 'Vue',
axios: 'axios',
vuex: 'Vuex',
'vue-router': 'VueRouter',
'element-ui': 'ELEMENT',
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
......
......@@ -82,7 +82,7 @@ module.exports = new Promise((resolve, reject) => {
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}${config.dev.assetsPublicPath}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
......
......@@ -8,7 +8,7 @@ module.exports = {
dev: {
// Paths
assetsSubDirectory: "static",
assetsPublicPath: "/",
assetsPublicPath: "/haoban-devops",
proxyTable: proxyConfig.proxyList,
// Various Dev Server settings
......
......@@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2995156_rf810o69kh.css">
<title>运维平台</title>
......@@ -10,5 +9,13 @@
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script>
(function() {
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//' + host + src + '"><\/script>');
})();
</script>
</body>
</html>
......@@ -2914,7 +2914,7 @@
},
"de-indent": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",
"resolved": "https://registry.nlark.com/de-indent/download/de-indent-1.0.2.tgz",
"integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
"dev": true
},
......@@ -12342,9 +12342,9 @@
}
},
"vue": {
"version": "2.6.10",
"resolved": "http://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.10.tgz",
"integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc="
"version": "2.6.6",
"resolved": "https://registry.npmmirror.com/vue/download/vue-2.6.6.tgz",
"integrity": "sha512-Y2DdOZD8sxApS+iUlwv1v8U1qN41kq6Kw45lM6nVZKhygeWA49q7VCCXkjXqeDBXgurrKWkYQ9cJeEJwAq0b9Q=="
},
"vue-axios": {
"version": "2.1.4",
......@@ -12502,9 +12502,9 @@
}
},
"vue-template-compiler": {
"version": "2.6.10",
"resolved": "http://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.10.tgz",
"integrity": "sha1-MjtPNJXwT6o1AzN6gvXWUHeZycw=",
"version": "2.6.6",
"resolved": "https://registry.npmmirror.com/vue-template-compiler/download/vue-template-compiler-2.6.6.tgz",
"integrity": "sha1-qAesvz1Rlx03IddeyxuSe1F8GgI=",
"dev": true,
"requires": {
"de-indent": "^1.0.2",
......
......@@ -16,12 +16,12 @@
"dependencies": {
"@antv/g2": "^3.5.12",
"axios": "^0.18.0",
"element-ui": "^2.15.7",
"element-ui": "^2.15.6",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue": "^2.5.2",
"vue": "2.6.6",
"vue-axios": "^2.1.4",
"vue-router": "^3.0.7",
"vue-router": "^3.0.2",
"vuex": "^3.1.0"
},
"devDependencies": {
......@@ -69,7 +69,7 @@
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.1.2",
"vue-template-compiler": "^2.5.2",
"vue-template-compiler": "2.6.6",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
......
......@@ -5,13 +5,13 @@ import Vue from 'vue';
// import Cookies from 'js-cookie';
import App from './App';
import router from './router';
import ElementUI from 'element-ui';
// import ElementUI from 'element-ui';
import VueAxios from 'vue-axios';
import axios from 'axios';
import store from './store/store'; // 状态管理器 vuex
import '../static/css/public.css'; // 公用样式
import 'element-ui/lib/theme-chalk/index.css'; // elementUI的样式
// import 'element-ui/lib/theme-chalk/index.css'; // elementUI的样式
import '../static/font/iconfont.css'; // iconfont
import '../theme/index.css'; // 新主题
import './assets/common.css';
......@@ -19,7 +19,7 @@ import filters from './filters/index.js';
Vue.config.productionTip = false;
Vue.use(ElementUI);
// Vue.use(ElementUI);
Vue.use(VueAxios, axios);
// 注册一个全局自定义指令 `v-focus`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment