搭建dev环境

更改package.json

vue ssr渲染(3)

 更改dev.js,先创建一个html放到webpack输出目录下,

vue ssr渲染(3)

npm run dev,浏览器打开http://localhost:8080,就可正常访问了, 

控制台输出 :main.js:1 hello 我是app

解决index.html的问题,html-webpack-plugin

npm i html-webpack-plugin -D

vue ssr渲染(3)

更改index.html文件,因为html-webpack-plugin开启了inject

vue ssr渲染(3)

下一章,集成vue 

相关文章:

  • 2022-01-01
  • 2021-11-13
  • 2022-02-22
  • 2022-12-23
  • 2021-04-22
  • 2021-07-07
  • 2021-08-19
猜你喜欢
  • 2021-07-31
  • 2021-05-05
  • 2021-11-19
  • 2021-10-18
  • 2021-11-11
  • 2021-11-17
  • 2021-10-02
相关资源
相似解决方案