akfun 3.1.9 → 3.2.0
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.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "前端脚手架:支持Vue技术栈和react技术栈",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"前端工程",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"@rollup/plugin-image": "^2.1.1",
|
|
74
74
|
"@rollup/plugin-json": "^4.1.0",
|
|
75
75
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
76
|
+
"@rollup/plugin-typescript": "^8.3.1",
|
|
76
77
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
|
77
78
|
"@typescript-eslint/parser": "^5.10.2",
|
|
78
79
|
"@vue/compiler-sfc": "^3.2.29",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// rollup.config.js
|
|
2
2
|
const { babel } = require('@rollup/plugin-babel');
|
|
3
3
|
const { nodeResolve } = require('@rollup/plugin-node-resolve'); // 支持node中的文件导入
|
|
4
|
+
// const jsx = require('rollup-plugin-jsx'); // 用于处理jsx
|
|
5
|
+
const typescript = require('@rollup/plugin-typescript'); // 支持ts
|
|
4
6
|
const commonjs = require('@rollup/plugin-commonjs'); // 识别cmd模块
|
|
5
7
|
const vue = require('rollup-plugin-vue');
|
|
6
8
|
const json = require('@rollup/plugin-json'); // 识别json类型文件
|
|
@@ -20,9 +22,9 @@ const cssnano = require('cssnano');
|
|
|
20
22
|
const { resolveToCurrentRoot, resolveToCurrentDist } = require('../utils/pathUtils'); // 统一路径解析
|
|
21
23
|
const babelConfig = require('./babel.config'); // Babel的配置文件
|
|
22
24
|
const curProjectConfig = require('./index'); // 引入当前项目配置文件
|
|
23
|
-
const {buildBanner} = require(
|
|
25
|
+
const { buildBanner } = require('../utils/akfunParams');
|
|
24
26
|
|
|
25
|
-
module.exports = function(fileName, akfunConfig) {
|
|
27
|
+
module.exports = function (fileName, akfunConfig) {
|
|
26
28
|
const curConfig = akfunConfig || curProjectConfig;
|
|
27
29
|
// 获取用户配置的构建入口文件
|
|
28
30
|
let rollupInput = resolveToCurrentRoot('src/main.js');
|
|
@@ -50,7 +52,9 @@ module.exports = function(fileName, akfunConfig) {
|
|
|
50
52
|
nodeResolve({
|
|
51
53
|
extensions: curConfig.webpack.resolve.extensions
|
|
52
54
|
}),
|
|
55
|
+
typescript(),
|
|
53
56
|
babel(babelConfig), // 备注,需要先babel()再commjs()
|
|
57
|
+
// jsx( {factory: 'React.createElement'} ),
|
|
54
58
|
vue(),
|
|
55
59
|
commonjs(),
|
|
56
60
|
postcss({
|
|
@@ -102,7 +102,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
102
102
|
}
|
|
103
103
|
],
|
|
104
104
|
// exclude: /node_modules/,
|
|
105
|
-
include: curProjectDir
|
|
105
|
+
include: curProjectDir // [resolve('src')],
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
test: /\.(jsx?)$/,
|
|
@@ -113,7 +113,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
113
113
|
}
|
|
114
114
|
],
|
|
115
115
|
// exclude: /node_modules/,
|
|
116
|
-
include: curProjectDir
|
|
116
|
+
include: curProjectDir // [resolve('src')],
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
// 图片资源
|