Skip to content

Commit

Permalink
feat: perfect migrate to @vue/cli-service, upgrade vue babel version (#…
Browse files Browse the repository at this point in the history
…1267)

* feat: perfect migrate to @vue/cli-service, upgrade vue babel version

1. update to @vue/[email protected], @babel/[email protected]
2. use vue-cli service replace config file in build/ and config/
3. upgrade vue and babel configuration
4. solve the svg-sprite config problem #980

refs: #932 #1087  #980 #1056

* fix: fix breadcrumb dependency

* fix: fix index template and static assets load with vue-cli 3

* fix: fix import driver.js in guide page

* refactor(mock): mak mock api compatible with both web-view and webpack server

1. 把 Mockjs 功能移到 server 端中间件,同时也兼容前端直接劫持 XHR
2. dev 环境下默认作为 express 中间件通过 webpack server 提供 mock api
3. prod 构建时,默认在前端用 Mockjs 劫持 XHR

benefits:
  - dev 开发调试时能直接看到 XHR 请求,方便调试网络,能和后端对接联调
  - 避开在开发时因为 Mockjs 引起的网络 bug
  - prod 构建时劫持 XHR,保证本项目的 Github Pages preview 能正常显示 (逻辑和 error-log 一样)
  - 前后台使用的 mock 是同一份代码,不会增加维护负担

ref: [#562](#562 (comment))

* update requires the lowest version of node

* add favicon

* fix(TreeTable): fix `Array.prototype.concat` on custom-tree-table page
  • Loading branch information
zthxxx authored and PanJiaChen committed Oct 29, 2018
1 parent 6c967f1 commit 40a7626
Show file tree
Hide file tree
Showing 71 changed files with 211 additions and 893 deletions.
17 changes: 0 additions & 17 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_CLI_BABEL_TRANSPILE_MODULES = true
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_BASE_API = '/api'
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_BASE_API = '/api'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ selenium-debug.log
*.ntvs*
*.njsproj
*.sln
*.local

package-lock.json
yarn.lock
14 changes: 14 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
presets: [
['@vue/app', { modules: 'commonjs' }]
],
plugins: [],
env: {
test: {
presets: [
['@vue/app', { modules: 'commonjs' }]
],
plugins: ['istanbul']
}
}
}
67 changes: 0 additions & 67 deletions build/build.js

This file was deleted.

64 changes: 0 additions & 64 deletions build/check-versions.js

This file was deleted.

Binary file removed build/logo.png
Binary file not shown.
108 changes: 0 additions & 108 deletions build/utils.js

This file was deleted.

5 changes: 0 additions & 5 deletions build/vue-loader.conf.js

This file was deleted.

Loading

0 comments on commit 40a7626

Please sign in to comment.