Commit bc6b3dcd authored by 郭志伟's avatar 郭志伟

build: vue引入切换

parent ea9edcf4
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1 ,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1 ,user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<script crossorigin="anonymous" integrity="sha384-OZmxTjkv7EQo5XDMPAmIkkvywVeXw59YyYh6zq8UKfkbor13jS+5p8qMTBSA1q+F" src="https://lib.baomitu.com/vue/2.6.11/vue.min.js"></script>
</head> </head>
<body> <body>
<noscript> <noscript>
......
...@@ -3,6 +3,11 @@ const resolve = dir => path.join(__dirname, dir); ...@@ -3,6 +3,11 @@ const resolve = dir => path.join(__dirname, dir);
const IS_PROD = process.env.NODE_ENV === "production"; const IS_PROD = process.env.NODE_ENV === "production";
module.exports = { module.exports = {
configureWebpack: {
externals: {
vue: "Vue"
}
},
chainWebpack: config => { chainWebpack: config => {
// 修复HMR // 修复HMR
config.resolve.symlinks(true); config.resolve.symlinks(true);
...@@ -41,7 +46,6 @@ module.exports = { ...@@ -41,7 +46,6 @@ module.exports = {
priority: 10, priority: 10,
chunks: "initial" // only package third parties that are initially dependent chunks: "initial" // only package third parties that are initially dependent
}, },
// TODO 🤨打包没用,emmmmmmmmmmm
cherryUI: { cherryUI: {
name: "chunk-cherryUI", // split cherryUI into a single package name: "chunk-cherryUI", // split cherryUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
......
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