akfun 5.0.1 → 5.0.2
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
|
@@ -31,6 +31,7 @@ module.exports = function (fileName, akfunConfig) {
|
|
|
31
31
|
const curConfig = akfunConfig || projectConfig;
|
|
32
32
|
const build2esm = curConfig.build2esm || {};
|
|
33
33
|
const curWebpackConfig = curConfig.webpack || {};
|
|
34
|
+
const buildType = build2esm.type || 'ts';
|
|
34
35
|
// 获取用户配置的构建入口文件
|
|
35
36
|
let rollupInput = resolveToCurrentRoot('src/main.js');
|
|
36
37
|
if (build2esm.input) {
|
|
@@ -70,9 +71,10 @@ module.exports = function (fileName, akfunConfig) {
|
|
|
70
71
|
nodeResolve({
|
|
71
72
|
extensions: curConfig.webpack.resolve.extensions
|
|
72
73
|
}),
|
|
73
|
-
typescript(),
|
|
74
|
+
buildType === 'ts' ? typescript() : undefined,
|
|
74
75
|
babel(babelConfig), // 备注,需要先babel()再commjs()
|
|
75
76
|
// jsx( {factory: 'React.createElement'} ),
|
|
77
|
+
buildType === 'ts' ? jsx( {factory: 'React.createElement'} ) : undefined,
|
|
76
78
|
vue(),
|
|
77
79
|
commonjs(),
|
|
78
80
|
postcss({
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Numerous always-ignore extensions
|
|
2
|
+
*.bak
|
|
3
|
+
*.patch
|
|
4
|
+
*.diff
|
|
5
|
+
*.err
|
|
6
|
+
|
|
7
|
+
# temp file for git conflict merging
|
|
8
|
+
*.orig
|
|
9
|
+
*.log
|
|
10
|
+
*.rej
|
|
11
|
+
*.swo
|
|
12
|
+
*.swp
|
|
13
|
+
*.zip
|
|
14
|
+
*.vi
|
|
15
|
+
*~
|
|
16
|
+
*.sass-cache
|
|
17
|
+
*.tmp.html
|
|
18
|
+
*.dump
|
|
19
|
+
|
|
20
|
+
# OS or Editor folders
|
|
21
|
+
.DS_Store
|
|
22
|
+
._*
|
|
23
|
+
.cache
|
|
24
|
+
.project
|
|
25
|
+
.settings
|
|
26
|
+
.tmproj
|
|
27
|
+
*.esproj
|
|
28
|
+
*.sublime-project
|
|
29
|
+
*.sublime-workspace
|
|
30
|
+
nbproject
|
|
31
|
+
thumbs.db
|
|
32
|
+
*.iml
|
|
33
|
+
.vscode/
|
|
34
|
+
|
|
35
|
+
# Folders to ignore
|
|
36
|
+
.hg
|
|
37
|
+
.svn
|
|
38
|
+
.CVS
|
|
39
|
+
.idea
|
|
40
|
+
node_modules/
|
|
41
|
+
jscoverage_lib/
|
|
42
|
+
.svn
|
|
43
|
+
|
|
44
|
+
# log files
|
|
45
|
+
npm-debug.log*
|
|
46
|
+
yarn-debug.log*
|
|
47
|
+
yarn-error.log*
|
|
@@ -77,6 +77,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
77
77
|
? [
|
|
78
78
|
nodeExternals({
|
|
79
79
|
importType: 'commonjs',
|
|
80
|
+
additionalModuleDirs: curWebpackConfig.additionalModuleDirs || [],
|
|
80
81
|
allowlist: curWebpackConfig.allowList ? curWebpackConfig.allowList : []
|
|
81
82
|
})
|
|
82
83
|
].concat(curWebpackConfig.externals)
|
|
@@ -214,6 +215,7 @@ module.exports = (_curEnvConfig, _akfunConfig) => {
|
|
|
214
215
|
? [
|
|
215
216
|
nodeExternals({
|
|
216
217
|
importType: 'commonjs',
|
|
218
|
+
additionalModuleDirs: curEnvConfig.additionalModuleDirs || curWebpackConfig.additionalModuleDirs || [],
|
|
217
219
|
allowlist: allowList || []
|
|
218
220
|
})
|
|
219
221
|
].concat(externals)
|