-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils): using universal build config and fix compatibility issue (#…
- Loading branch information
1 parent
5dabe04
commit 91d14b8
Showing
3 changed files
with
22 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@modern-js/utils': patch | ||
--- | ||
|
||
fix(utils): using universal build config and fix compatibility issue | ||
|
||
fix(utils): 使用 universal 构建配置,修复兼容性问题 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,18 @@ | ||
const { universalBuildConfig } = require('@scripts/build'); | ||
|
||
module.exports = { | ||
buildConfig: [ | ||
{ | ||
buildType: 'bundleless', | ||
format: 'cjs', | ||
target: 'es2019', | ||
dts: false, | ||
outDir: './dist/cjs', | ||
copy: { | ||
buildConfig: universalBuildConfig.map((item, index) => { | ||
if (index === 0) { | ||
item.copy = { | ||
patterns: [ | ||
{ | ||
from: './compiled', | ||
context: __dirname, | ||
to: '../compiled', | ||
}, | ||
], | ||
}, | ||
externalHelpers: true, | ||
}, | ||
{ | ||
buildType: 'bundleless', | ||
format: 'esm', | ||
target: 'es2019', | ||
dts: false, | ||
outDir: './dist/esm', | ||
externalHelpers: true, | ||
}, | ||
{ | ||
buildType: 'bundleless', | ||
dts: { | ||
only: true, | ||
}, | ||
outDir: './dist/types', | ||
externalHelpers: true, | ||
}, | ||
], | ||
}; | ||
} | ||
return item; | ||
}), | ||
}; |