Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 workaround due mako's interop add default to a empty file #12846

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [12.x, 14.x]
os: [ubuntu-latest, macos-latest, windows-latest]
node_version: [12, 14]
os: [ubuntu-latest, macos-13, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://registry.yarnpkg.com'
- name: restore lerna
id: cache
uses: actions/cache@v2
Expand Down
5 changes: 5 additions & 0 deletions packages/runtime/src/Plugin/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export default class Plugin {
assert(!!plugin.apply, `register failed, plugin.apply must supplied`);
assert(!!plugin.path, `register failed, plugin.path must supplied`);
Object.keys(plugin.apply).forEach((key) => {
// workaround for https://github.com/umijs/mako/issues/1657
// root cause: mako bundler will add a default export to an empty module
if (key === 'default') {
return;
}
assert(
this.validKeys.indexOf(key) > -1,
`register failed, invalid key ${key} from plugin ${plugin.path}.`,
Expand Down
Loading