vue-cli 生成项目配置本地mock服务以及proxy服务
1 | // vue.config.js |
時間是一碗長情酒,抿一口,到白頭
1 | // vue.config.js |
SPA中入口文件(main.js)通常都比较大,如果采用按需加载的方式载入view-design 体积会更大。
2019年11月21日 做过实验,按需加载所有的组件,请求时main.js 的大小为8M,直接通过 Vue.use(ViewUI) 的形式,mai n.js 的大小为4M左右。
如果要启用css module 需要在style标签中插入 module 属性,否则不会生效
独立样式表文件的话需要在 style 标签中 @import ‘./App.scss’ 这样引入,仍然使用 :class=”$style.red” 这样的形式使用
autodll-webpack-plugin 插件 path 和webpack的 publicPath冲突
mini-css-extract-plugin 配置完loader之后还需要配置plugins,2019年11月12号因为忘记配置plugins,导致一致报错,看了半小时。
Vue-router 如果使用 history 模式,会有刷新页面就会404的问题,原因是SPA中当你刷新页面的时候实际请求的是该路径下的页面,但SPA只有index.html因此导致404,开发环境如果用webpack-dev-server,设置historyApiFallback属性为true,生产环境nginx配置try_files $uri $uri/ /index.html;
hello everybody,
在我热衷于编写一些笔记发布到hexo所生成的静态博客的时候,遇到了不少问题。其中就是hexo生成的静态资源发布到GitHub pages后并不能正确渲染数学公式。
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment