Skip to content

Commit

Permalink
fix: build standalone on windows (#14462)
Browse files Browse the repository at this point in the history
* fix: build standalone on windows

* fix
  • Loading branch information
liuxingbaoyu committed Apr 14, 2022
1 parent d281a54 commit e71843a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Gulpfile.mjs
Expand Up @@ -297,6 +297,8 @@ function buildRollup(packages, targetBrowsers) {
input,
external,
onwarn(warning, warn) {
const osifyPath = str => str.split("/").join(path.sep);

if (warning.code === "CIRCULAR_DEPENDENCY") return;
if (warning.code === "UNUSED_EXTERNAL_IMPORT") {
warn(warning);
Expand All @@ -308,14 +310,15 @@ function buildRollup(packages, targetBrowsers) {
// We can safely ignore this warning, and let Rollup replace it with undefined.
if (
warning.code === "MISSING_EXPORT" &&
warning.exporter === "packages/babel-core/src/index.ts" &&
warning.exporter ===
osifyPath("packages/babel-core/src/index.ts") &&
warning.missing === "default" &&
[
"@babel/helper-define-polyfill-provider",
"babel-plugin-polyfill-corejs2",
"babel-plugin-polyfill-corejs3",
"babel-plugin-polyfill-regenerator",
].some(pkg => warning.importer.includes(pkg))
].some(pkg => warning.importer.includes(osifyPath(pkg)))
) {
return;
}
Expand Down

0 comments on commit e71843a

Please sign in to comment.