Skip to content

Commit

Permalink
fix: πŸ› workaround due mako's interop add default to a empty file (#12846
Browse files Browse the repository at this point in the history
)

* fix: πŸ› workaround due mako's interop add default to a empty file

* fix: πŸ› ci node setup

* fix: πŸ› node 12/14 does not support macos-latest use M1 chips in gh actions

* chore: 🎨 add a comment
  • Loading branch information
stormslowly authored Dec 16, 2024
1 parent 2e2c008 commit 1c66a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit 1c66a9e

Please sign in to comment.