akfun 3.2.5 → 3.2.8-vue3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akfun",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.8-vue3-beta.1",
|
|
4
4
|
"description": "前端脚手架:支持Vue技术栈和react技术栈",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"前端工程",
|
|
@@ -44,13 +44,14 @@
|
|
|
44
44
|
"url": "https://github.com/wibetter/akfun/issues"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"eslint": "^8.8.0",
|
|
48
47
|
"chalk": "^4.0.0",
|
|
48
|
+
"eslint": "^8.8.0",
|
|
49
49
|
"ora": "^4.0.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@babel/cli": "^7.17.0",
|
|
53
53
|
"@babel/core": "^7.17.0",
|
|
54
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
54
55
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
55
56
|
"@babel/plugin-proposal-decorators": "^7.17.0",
|
|
56
57
|
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
|
|
@@ -74,13 +75,11 @@
|
|
|
74
75
|
"@rollup/plugin-json": "^4.1.0",
|
|
75
76
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
76
77
|
"@rollup/plugin-typescript": "^8.3.1",
|
|
77
|
-
"
|
|
78
|
+
"@svgr/webpack": "^6.2.1",
|
|
78
79
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
|
79
80
|
"@typescript-eslint/parser": "^5.10.2",
|
|
80
|
-
"@vue/compiler-sfc": "^3.2.29",
|
|
81
81
|
"@vue/eslint-config-typescript": "^10.0.0",
|
|
82
82
|
"autoprefixer": "^10.4.2",
|
|
83
|
-
"@babel/eslint-parser": "^7.17.0",
|
|
84
83
|
"babel-loader": "^8.2.3",
|
|
85
84
|
"babel-plugin-import": "^1.13.3",
|
|
86
85
|
"chalk": "^4.0.0",
|
|
@@ -88,6 +87,7 @@
|
|
|
88
87
|
"connect-history-api-fallback": "^1.6.0",
|
|
89
88
|
"copy-webpack-plugin": "^10.2.4",
|
|
90
89
|
"css-loader": "^6.6.0",
|
|
90
|
+
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
91
91
|
"cssnano": "^5.0.16",
|
|
92
92
|
"deepmerge": "^4.2.2",
|
|
93
93
|
"del": "^6.0.0",
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
"eslint-config-prettier": "^8.3.0",
|
|
98
98
|
"eslint-friendly-formatter": "^4.0.1",
|
|
99
99
|
"eslint-import-resolver-webpack": "^0.13.2",
|
|
100
|
-
"eslint-webpack-plugin": "^3.1.1",
|
|
101
100
|
"eslint-plugin-html": "^6.2.0",
|
|
102
101
|
"eslint-plugin-import": "^2.25.4",
|
|
103
102
|
"eslint-plugin-prettier": "^4.0.0",
|
|
104
103
|
"eslint-plugin-react": "^7.28.0",
|
|
105
104
|
"eslint-plugin-vue": "^8.4.0",
|
|
105
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
106
106
|
"eventsource-polyfill": "^0.9.6",
|
|
107
107
|
"express": "^4.17.2",
|
|
108
108
|
"figlet": "^1.5.2",
|
|
@@ -114,8 +114,6 @@
|
|
|
114
114
|
"http-proxy-middleware": "^2.0.2",
|
|
115
115
|
"inquirer": "^8.2.0",
|
|
116
116
|
"mini-css-extract-plugin": "^2.5.3",
|
|
117
|
-
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
118
|
-
"sass": "^1.49.7",
|
|
119
117
|
"open": "^8.4.0",
|
|
120
118
|
"ora": "^4.0.4",
|
|
121
119
|
"params-replace-loader": "^1.1.6",
|
|
@@ -128,9 +126,11 @@
|
|
|
128
126
|
"qs": "^6.10.3",
|
|
129
127
|
"rimraf": "^3.0.2",
|
|
130
128
|
"rollup": "^2.67.0",
|
|
129
|
+
"rollup-plugin-node-externals": "^4.0.0",
|
|
131
130
|
"rollup-plugin-postcss": "^4.0.2",
|
|
132
131
|
"rollup-plugin-terser": "^7.0.2",
|
|
133
132
|
"rollup-plugin-vue": "^6.0.0",
|
|
133
|
+
"sass": "^1.49.7",
|
|
134
134
|
"sass-loader": "^12.4.0",
|
|
135
135
|
"sass-resources-loader": "^2.2.4",
|
|
136
136
|
"semver": "^7.3.5",
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
"typescript": "^4.5.5",
|
|
146
146
|
"url-loader": "^4.1.1",
|
|
147
147
|
"vue-eslint-parser": "^8.2.0",
|
|
148
|
-
"vue-loader": "^
|
|
148
|
+
"vue-loader": "^17.0.0",
|
|
149
149
|
"vue-style-loader": "^4.1.3",
|
|
150
|
-
"vue-
|
|
150
|
+
"@vue/compiler-sfc": "^3.2.37",
|
|
151
151
|
"webpack": "^5.68.0",
|
|
152
152
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
153
153
|
"webpack-cli": "^4.9.2",
|
|
@@ -107,11 +107,13 @@ exports.cssLoaders = function (options) {
|
|
|
107
107
|
return loaders;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
const sassOptions = options.sassOptions || {};
|
|
111
|
+
|
|
110
112
|
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
|
111
113
|
return {
|
|
112
114
|
css: generateLoaders(),
|
|
113
|
-
sass: generateLoaders('sass', { indentedSyntax: true }),
|
|
114
|
-
scss: generateLoaders('sass'),
|
|
115
|
+
sass: generateLoaders('sass', { indentedSyntax: true, sassOptions }),
|
|
116
|
+
scss: generateLoaders('sass', { sassOptions }),
|
|
115
117
|
less: generateLoaders('less'),
|
|
116
118
|
stylus: generateLoaders('stylus'),
|
|
117
119
|
styl: generateLoaders('stylus')
|
|
@@ -7,6 +7,7 @@ module.exports = {
|
|
|
7
7
|
loaders: utils.cssLoaders({
|
|
8
8
|
cssLoaderUrl: config.webpack.cssLoaderUrl, // 用于自定义css-loader配置项[url]
|
|
9
9
|
cssLoaderUrlDir: config.webpack.cssLoaderUrlDir, // 用于设置css-loader配置项[url]的生效目录
|
|
10
|
+
sassOptions: config.webpack.sassOptions, // 用于设置sass-loader配置项
|
|
10
11
|
sourceMap: isProduction // 生产环境sourceMap是true
|
|
11
12
|
? config.build.productionSourceMap
|
|
12
13
|
: config.dev.cssSourceMap,
|
|
@@ -3,7 +3,8 @@ const fs = require('fs');
|
|
|
3
3
|
const webpack = require('webpack');
|
|
4
4
|
// const tsImportPluginFactory = require('ts-import-plugin'); // 按需加载lib库组件代码
|
|
5
5
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
6
|
-
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
|
6
|
+
// const VueLoaderPlugin = require('vue-loader/lib/plugin'); // vue2.0
|
|
7
|
+
const {VueLoaderPlugin} = require('vue-loader'); // vue3.0
|
|
7
8
|
const nodeExternals = require('webpack-node-externals');
|
|
8
9
|
// const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
|
|
9
10
|
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
|
@@ -122,6 +123,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
122
123
|
*/
|
|
123
124
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
|
124
125
|
type: 'asset',
|
|
126
|
+
issuer: /\.s?css$/,
|
|
125
127
|
parser: {
|
|
126
128
|
dataUrlCondition: {
|
|
127
129
|
maxSize: 2 * 1024 //data转成url的条件,也就是转成bas64的条件,maxSize相当于limit
|
|
@@ -132,6 +134,11 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
132
134
|
filename: utils.assetsPath('img/[name].[hash:7][ext]') //[name]指原来的名字,[hash:6]取哈希的前六位,[ext]指原来的扩展名
|
|
133
135
|
}
|
|
134
136
|
},
|
|
137
|
+
{
|
|
138
|
+
test: /\.svg$/,
|
|
139
|
+
issuer: /\.[jt]sx?$/,
|
|
140
|
+
use: ['@svgr/webpack']
|
|
141
|
+
},
|
|
135
142
|
{
|
|
136
143
|
// 视频音频资源
|
|
137
144
|
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
|
@@ -311,5 +318,11 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
311
318
|
webpackConfig.plugins.push(...curWebpackConfig.plugins);
|
|
312
319
|
}
|
|
313
320
|
|
|
321
|
+
// 判断是否有自定义loader
|
|
322
|
+
if (curWebpackConfig.moduleRules && Array.isArray(curWebpackConfig.moduleRules)) {
|
|
323
|
+
// 添加自定义自定义loader
|
|
324
|
+
webpackConfig.module.rules.push(...curWebpackConfig.moduleRules);
|
|
325
|
+
}
|
|
326
|
+
|
|
314
327
|
return webpackConfig;
|
|
315
328
|
};
|