vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

自定义的chunk会导致vue无法挂载/custom chunks may lead vue cant mount #4856

Open rayfalling opened 4 years ago

rayfalling commented 4 years ago

Version

4.0.5

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (20) x64 Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
  Binaries:
    Node: 12.9.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.0.5
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.0.5
    @vue/cli-plugin-babel: ^4.0.5 => 4.0.5
    @vue/cli-plugin-router: ^4.0.5 => 4.0.5
    @vue/cli-plugin-vuex: ^4.0.5 => 4.0.5
    @vue/cli-service: ^4.0.5 => 4.0.5
    @vue/cli-shared-utils:  4.0.5
    @vue/component-compiler-utils:  3.0.2
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    vue: ^2.6.10 => 2.6.10
    vue-axios: ^2.1.5 => 2.1.5
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.7.2
    vue-router: ^3.1.3 => 3.1.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.1.2 => 3.1.2
    vuex-persistedstate: ^2.7.0 => 2.7.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

set page with custom chunks ,then open browser, will see white page

What is expected?

see nomal page

What is actually happening?

while page

haoqunjiang commented 4 years ago

Thanks for submitting this issue! Due to our limited time, we ask you to include a reproduction link to a minimal full reproduction of your problem (for example in a GitHub repository) so we can find what is causing the issue. Thank you for your understanding!

rayfalling commented 4 years ago

repo https://git.rayfalling.com/rayfalling/vue-cli-error-repo

Maorey commented 4 years ago

可以写个插件(依赖html-webpack-plugin@vue/preload-webpack-plugin 即 @vue/vli v3+),思路是将preload的放到body里,参考我的模板项目

rayfalling commented 4 years ago

但是这个是在@vue/cli 3下正常 v4下不正常