vue-admin-template icon indicating copy to clipboard operation
vue-admin-template copied to clipboard

配置多页面以后,dev正常,build部署后白屏

Open snoy1988 opened this issue 5 years ago • 7 comments

pages:{ wap: 'src/pages/wap/main.js', index: 'src/pages/index/main.js'

},

snoy1988 avatar Jul 24 '20 01:07 snoy1988

以上版本是4.3.0 的,切换到4.4.0的版本,dev模式报错 TypeError: Cannot read property '__expression' of undefined

snoy1988 avatar Jul 24 '20 01:07 snoy1988

官方文档

提示
当在 multi-page 模式下构建时,webpack 配置会包含不一样的插件 (这时会存在多个 html-webpack-plugin 和 preload-webpack-plugin 的实例)。如果你试图修改这些插件的选项,请确认运行 vue inspect。

sunshujie1990 avatar Jul 25 '20 07:07 sunshujie1990

image image

html-webpack-plugin 和 preload-webpack-plugin两个插件要加上页面名称的后缀.

sunshujie1990 avatar Jul 25 '20 07:07 sunshujie1990

@sunshujie1990 dev模式正常了,但是build出来的结果还是白屏

snoy1988 avatar Jul 27 '20 16:07 snoy1988

image image

html-webpack-plugin 和 preload-webpack-plugin两个插件要加上页面名称的后缀.

Thank you,it works well,and i want to ask how do you get it?

kunfan96 avatar Sep 16 '20 09:09 kunfan96

本地打包后一切正常,但是部署后页面白屏,‘src’ of null,这个是怎么回事

liang0925 avatar Sep 21 '20 01:09 liang0925

遇到了同样的问题

fishYaok avatar Jul 09 '21 07:07 fishYaok