Commit c64f47cd authored by 尚斌杰's avatar 尚斌杰

修复打包bug

parent 7150232b
......@@ -204,6 +204,7 @@ async function build (args, api, options) {
const pagePath = "./src/pages/" + entry
webpackConfig.entry={}
webpackConfig.entry[entry] = pagePath + '/index.ts'
const curPublicPath = webpackConfig.output.publicPath
webpackConfig.output.publicPath = ''
webpackConfig.output.path = targetDir
for(let item of webpackConfig.plugins) {
......@@ -218,8 +219,7 @@ async function build (args, api, options) {
if(item.test.toString().indexOf('png|jp')>=0){
for (const itemChild of item.use) {
if(itemChild.options){
const curPublicPath = itemChild.options.publicPath
itemChild.options.publicPath = curPublicPath?curPublicPath.indexOf(entry)<0?publicPath+'/'+entry:publicPath:'/'+entry
itemChild.options.publicPath = curPublicPath?curPublicPath.indexOf(entry)<0?curPublicPath+'/'+entry:curPublicPath:'/'+entry
break
}
}
......
{
"name": "vue-cli-plugin-ts-multi-pages",
"version": "1.1.11",
"version": "1.1.12",
"description": "vue-cli3多页开发插件TS版",
"main": "index.js",
"scripts": {
......
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