企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] # 使用vue代替 jquery # [Building Mobile Apps With Capacitor And Vue.js](https://www.smashingmagazine.com/2018/07/mobile-apps-capacitor-vue-js/) https://www.jianshu.com/p/b438ed88616f # Vue-Cli3 可以新建个 `vue.config.js` 进行相关 webpack 配置,比如 ```js // vue.config.js module.exports = { //调整 webpack 配置 https://cli.vuejs.org/zh/guide/webpack.html#%E7%AE%80%E5%8D%95%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%B9%E5%BC%8F configureWebpack: { plugins: [ new MyAwesomeWebpackPlugin() ] }, // webpack配置 // 对内部的 webpack 配置进行更细粒度的修改 https://github.com/neutrinojs/webpack-chain see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md // loader chainWebpack: config => { config.module .rule('vue') .use('vue-loader') .loader('vue-loader') .tap(options => { // 修改它的选项...loader return options }) }, // 生产环境关闭map productionSourceMap:false, // baseUrl: './',//vue-cli3.3以下版本使用 // 基本URL publicPath:'./',//vue-cli3.3+新版本使用 // 基本URL outputDir:'dist', // 输出文件目录 //放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 assetsDir: 'static', indexPath:'index.html',//指定index.html 路径 filenameHashing:true,//文件名带hash // multi-page模式,每个“page”应该有一个对应的 JavaScript 入口文件 pages: { index: { // page 的入口 entry: 'src/index/main.js', // 模板来源 template: 'public/index.html', // 在 dist/index.html 的输出 filename: 'index.html', // 当使用 title 选项时, // template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title> title: 'Index Page', // 在这个页面中包含的块,默认情况下会包含 // 提取出来的通用 chunk 和 vendor chunk。 chunks: ['chunk-vendors', 'chunk-common', 'index'] }, // 当使用只有入口的字符串格式时, // 模板会被推导为 `public/subpage.html` // 并且如果找不到的话,就回退到 `public/index.html`。 // 输出文件名会被推导为 `subpage.html`。 subpage: 'src/subpage/main.js' }, //css配置 css: { // 启用 CSS modules modules: false, // 是否使用css分离插件 extract: true, // 开启 CSS source maps,一般不建议开启 sourceMap: false, // css预设器配置项 loaderOptions: { sass: { //设置css中引用文件的路径,引入通用使用的scss文件(如包含的@mixin) data: ` $baseUrl: "/"; @import '@/assets/scss/\_common.scss'; ` }, css: { // 这里的选项会传递给 css-loader }, postcss: { // 这里的选项会传递给 postcss-loader } } }, //dev server devServer: { host:127.0.0.1 port:8000, proxy: 'http://localhost:4000', overlay: { warnings: true,//警告 errors: true//错误 } } } ``` **其他** 1. 可使用vue serve和vue build 对单个vue文件快速开发 2. vue ui 图形化界面创建管理项目 [让vue-cli3.0 配置简单起来(vue.config.js编结)](https://juejin.im/post/5bd02f98e51d457a944b634f) [Awesome Vue-Cli3 Example](https://github.com/nicejade/awesome-vue-cli3-example) [vue-cli3.0使用及部分配置详解](https://www.jb51.net/article/146483.htm) [初识babel 7](https://www.jianshu.com/p/0ea6065cb39e) # vue 动画效果 # 资源 [VUX](https://vux.li/) 移动端 UI 组件库 [vuemastery](https://www.vuemastery.com/) [vuejsfeed](https://vuejsfeed.com/) # [几种常用的认证机制](http://www.cnblogs.com/xiekeli/p/5607107.html) HTTP访问控制(CORS)https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS # [electron-vue ](https://github.com/SimulatedGREG/electron-vue)