将包管理器更换为 pnpm,更新 Vue CLI 版本,调整配置文件
This commit is contained in:
14
.eslintrc.js
14
.eslintrc.js
@@ -1,24 +1,26 @@
|
||||
// const isProduction = (process.env.NODE_ENV === 'production');
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/recommended',
|
||||
'eslint:recommended'
|
||||
'eslint:recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
parser: '@babel/eslint-parser',
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'no-debugger': 'off',
|
||||
// 'no-console': (isProduction ? 'warn' : 'off'),
|
||||
// 'no-debugger': (isProduction ? 'warn' : 'off'),
|
||||
'vue/html-closing-bracket-newline': 'off',
|
||||
'vue/html-indent': 'off',
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/no-v-html': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off'
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
}
|
||||
};
|
||||
|
@@ -1,14 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"module": "CommonJS",
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"sourceMap": false,
|
||||
"target": "ES5"
|
||||
"target": "es5"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.vue",
|
||||
|
35509
package-lock.json
generated
35509
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
62
package.json
62
package.json
@@ -7,43 +7,49 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve --mode development",
|
||||
"serve:production": "vue-cli-service serve --mode production",
|
||||
"serve:all": "vue-cli-service serve --host 0.0.0.0 --mode development",
|
||||
"serve:local": "vue-cli-service serve --host 127.0.0.1 --mode development",
|
||||
"serve-production": "vue-cli-service serve --mode production",
|
||||
"serve-all": "vue-cli-service serve --mode development --host 0.0.0.0",
|
||||
"serve-local": "vue-cli-service serve --mode development --host 127.0.0.1",
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"build:modern": "vue-cli-service build --mode production --modern",
|
||||
"lint:check": "vue-cli-service lint --no-fix",
|
||||
"lint:fix": "vue-cli-service lint"
|
||||
"build-modern": "vue-cli-service build --mode production --modern",
|
||||
"lint-check": "vue-cli-service lint --no-fix",
|
||||
"lint-fix": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"bookmark-file-parser": "^1.0.6",
|
||||
"codemirror": "^5.63.3",
|
||||
"core-js": "^3.6.5",
|
||||
"dayjs": "^1.10.7",
|
||||
"codemirror": "^5.65.2",
|
||||
"core-js": "^3.8.3",
|
||||
"dayjs": "^1.11.0",
|
||||
"element-ui": "^2.15.6",
|
||||
"font-awesome": "^4.7.0",
|
||||
"html-entities": "^2.3.2",
|
||||
"lodash": "^4.17.21",
|
||||
"mathjs": "^10.0.0",
|
||||
"ress": "^4.0.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.2.0"
|
||||
"mathjs": "^10.4.0",
|
||||
"ress": "^5.0.2",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.5.1",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^5.0.0",
|
||||
"postcss-pxtorem": "^5.1.1",
|
||||
"sass": "^1.42.1",
|
||||
"sass-loader": "^8.0.2",
|
||||
"style-resources-loader": "^1.4.1",
|
||||
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"@vue/eslint-config-standard": "^6.1.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^5.1.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"less": "^4.0.0",
|
||||
"less-loader": "^8.0.0",
|
||||
"postcss-pxtorem": "^6.0.0",
|
||||
"sass": "^1.32.7",
|
||||
"sass-loader": "^12.0.0",
|
||||
"style-resources-loader": "^1.5.0",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
}
|
||||
|
12954
pnpm-lock.yaml
generated
Normal file
12954
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,51 @@
|
||||
const path = require('path');
|
||||
const packageName = process.env.npm_package_name;
|
||||
|
||||
const { defineConfig } = require('@vue/cli-service');
|
||||
|
||||
const { npm_package_name: packageName } = process.env;
|
||||
|
||||
function addStyleRes({ config = null, processor = '', patterns = [] }) {
|
||||
if (!config) {
|
||||
return;
|
||||
}
|
||||
|
||||
const rule = config.module.rule(processor);
|
||||
const types = ['normal', 'normal-modules', 'vue', 'vue-modules'];
|
||||
|
||||
types.forEach((type) => {
|
||||
rule.oneOf(type)
|
||||
.use('style-resources-loader')
|
||||
.loader('style-resources-loader')
|
||||
.options({ patterns });
|
||||
});
|
||||
}
|
||||
|
||||
if (packageName) {
|
||||
process.title = packageName;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
productionSourceMap: false,
|
||||
module.exports = defineConfig({
|
||||
|
||||
assetsDir: 'static',
|
||||
publicPath: './',
|
||||
outputDir: 'dist',
|
||||
publicPath: './',
|
||||
productionSourceMap: false,
|
||||
transpileDependencies: false,
|
||||
|
||||
chainWebpack: (config) => {
|
||||
addStyleRes({
|
||||
config,
|
||||
processor: 'less',
|
||||
patterns: [
|
||||
path.resolve(__dirname, 'src/assets/css/variable.less'),
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 9005,
|
||||
},
|
||||
|
||||
pages: {
|
||||
mainPage: {
|
||||
@@ -26,18 +62,4 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
|
||||
pluginOptions: {
|
||||
'style-resources-loader': {
|
||||
preProcessor: 'less',
|
||||
// 全局 Less 变量
|
||||
patterns: [
|
||||
path.resolve(__dirname, 'src/assets/css/variable.less'),
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 9005,
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user