diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8582611aecb..1511912dcc23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/packages/runtime/src/Plugin/Plugin.ts b/packages/runtime/src/Plugin/Plugin.ts index 82306b8cb33c..40fc7911cd33 100644 --- a/packages/runtime/src/Plugin/Plugin.ts +++ b/packages/runtime/src/Plugin/Plugin.ts @@ -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}.`,