akfun 3.2.5 → 3.2.8
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",
|
|
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,12 @@
|
|
|
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
81
|
"@vue/compiler-sfc": "^3.2.29",
|
|
81
82
|
"@vue/eslint-config-typescript": "^10.0.0",
|
|
82
83
|
"autoprefixer": "^10.4.2",
|
|
83
|
-
"@babel/eslint-parser": "^7.17.0",
|
|
84
84
|
"babel-loader": "^8.2.3",
|
|
85
85
|
"babel-plugin-import": "^1.13.3",
|
|
86
86
|
"chalk": "^4.0.0",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"connect-history-api-fallback": "^1.6.0",
|
|
89
89
|
"copy-webpack-plugin": "^10.2.4",
|
|
90
90
|
"css-loader": "^6.6.0",
|
|
91
|
+
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
91
92
|
"cssnano": "^5.0.16",
|
|
92
93
|
"deepmerge": "^4.2.2",
|
|
93
94
|
"del": "^6.0.0",
|
|
@@ -97,12 +98,12 @@
|
|
|
97
98
|
"eslint-config-prettier": "^8.3.0",
|
|
98
99
|
"eslint-friendly-formatter": "^4.0.1",
|
|
99
100
|
"eslint-import-resolver-webpack": "^0.13.2",
|
|
100
|
-
"eslint-webpack-plugin": "^3.1.1",
|
|
101
101
|
"eslint-plugin-html": "^6.2.0",
|
|
102
102
|
"eslint-plugin-import": "^2.25.4",
|
|
103
103
|
"eslint-plugin-prettier": "^4.0.0",
|
|
104
104
|
"eslint-plugin-react": "^7.28.0",
|
|
105
105
|
"eslint-plugin-vue": "^8.4.0",
|
|
106
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
106
107
|
"eventsource-polyfill": "^0.9.6",
|
|
107
108
|
"express": "^4.17.2",
|
|
108
109
|
"figlet": "^1.5.2",
|
|
@@ -114,8 +115,6 @@
|
|
|
114
115
|
"http-proxy-middleware": "^2.0.2",
|
|
115
116
|
"inquirer": "^8.2.0",
|
|
116
117
|
"mini-css-extract-plugin": "^2.5.3",
|
|
117
|
-
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
118
|
-
"sass": "^1.49.7",
|
|
119
118
|
"open": "^8.4.0",
|
|
120
119
|
"ora": "^4.0.4",
|
|
121
120
|
"params-replace-loader": "^1.1.6",
|
|
@@ -128,9 +127,11 @@
|
|
|
128
127
|
"qs": "^6.10.3",
|
|
129
128
|
"rimraf": "^3.0.2",
|
|
130
129
|
"rollup": "^2.67.0",
|
|
130
|
+
"rollup-plugin-node-externals": "^4.0.0",
|
|
131
131
|
"rollup-plugin-postcss": "^4.0.2",
|
|
132
132
|
"rollup-plugin-terser": "^7.0.2",
|
|
133
133
|
"rollup-plugin-vue": "^6.0.0",
|
|
134
|
+
"sass": "^1.49.7",
|
|
134
135
|
"sass-loader": "^12.4.0",
|
|
135
136
|
"sass-resources-loader": "^2.2.4",
|
|
136
137
|
"semver": "^7.3.5",
|
|
@@ -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,
|
|
@@ -122,6 +122,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
122
122
|
*/
|
|
123
123
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
|
124
124
|
type: 'asset',
|
|
125
|
+
issuer: /\.s?css$/,
|
|
125
126
|
parser: {
|
|
126
127
|
dataUrlCondition: {
|
|
127
128
|
maxSize: 2 * 1024 //data转成url的条件,也就是转成bas64的条件,maxSize相当于limit
|
|
@@ -132,6 +133,11 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
132
133
|
filename: utils.assetsPath('img/[name].[hash:7][ext]') //[name]指原来的名字,[hash:6]取哈希的前六位,[ext]指原来的扩展名
|
|
133
134
|
}
|
|
134
135
|
},
|
|
136
|
+
{
|
|
137
|
+
test: /\.svg$/,
|
|
138
|
+
issuer: /\.[jt]sx?$/,
|
|
139
|
+
use: ['@svgr/webpack']
|
|
140
|
+
},
|
|
135
141
|
{
|
|
136
142
|
// 视频音频资源
|
|
137
143
|
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
|
@@ -311,5 +317,11 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
311
317
|
webpackConfig.plugins.push(...curWebpackConfig.plugins);
|
|
312
318
|
}
|
|
313
319
|
|
|
320
|
+
// 判断是否有自定义loader
|
|
321
|
+
if (curWebpackConfig.moduleRules && Array.isArray(curWebpackConfig.moduleRules)) {
|
|
322
|
+
// 添加自定义自定义loader
|
|
323
|
+
webpackConfig.module.rules.push(...curWebpackConfig.moduleRules);
|
|
324
|
+
}
|
|
325
|
+
|
|
314
326
|
return webpackConfig;
|
|
315
327
|
};
|