Skip to content

Commit

Permalink
update:update
Browse files Browse the repository at this point in the history
  • Loading branch information
mason369 committed Jan 12, 2023
1 parent 5280608 commit 778423b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 29 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/code-line.yml

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
![](https://img.shields.io/badge/Node-%20%5E16.18.0-brightgreen)
![](https://img.shields.io/badge/npm-%5E8.19.2-blue)

<!-- start dependencies -->
<!-- end dependencies -->

[LiveDemo]()

---
Expand Down
11 changes: 10 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
module.exports = {presets: ["@vue/cli-plugin-babel/preset"]}
// 这是项目发布阶段需要用到的babel插件
const prodPlugins = [];
// 如果是发布阶段,处于生产环境,就向prodPlugins数组里添加一个插件
if (process.env.NODE_ENV === "production") {
prodPlugins.push("transform-remove-console");
}
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [...prodPlugins] // 这里...展开运算符,把上面定义的prodPlugins数组里面的每一项展开添加到这个plugins数组里面
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@vue/cli-service": "~5.0.0",
"autoprefixer": "^10.4.13",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.8.0",
Expand Down
2 changes: 0 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
lintOnSave : false,
transpileDependencies: true
});

module.exports = {
lintOnSave: false,
publicPath: "/Vue-project-template/",
// publicPath: process.env.NODE_ENV === "production" ? "./" : "/",

Expand Down

0 comments on commit 778423b

Please sign in to comment.