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

[Bug]: TypeError: Cannot read properties of undefined (reading 'async') #2319

Closed
gary-Shen opened this issue May 13, 2024 · 1 comment · Fixed by #2321
Closed

[Bug]: TypeError: Cannot read properties of undefined (reading 'async') #2319

gary-Shen opened this issue May 13, 2024 · 1 comment · Fixed by #2321
Assignees
Labels
🐞 bug Something isn't working

Comments

@gary-Shen
Copy link

gary-Shen commented May 13, 2024

Version

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 722.27 MB / 32.00 GB
  Shell: 5.9 - /bin/zsh
Browsers:
  Chrome: 124.0.6367.201
  Safari: 17.4.1
npmPackages:
  @rsbuild/core: ^0.6.13 => 0.6.13 
  @rsbuild/plugin-react: ^0.6.13 => 0.6.13

Details

Turn on the manifest option when using module federation plugin (v2). see the logs bellow:
image

It's seems caused by the dynamic entry import.

Reproduce link

https://stackblitz.com/~/github.com/gary-Shen/rsbuild-manifest?file=rsbuild.config.ts

Reproduce Steps

Well, it's very simple to reproduce.

  1. Create a react project by rsbuild
npm create rsbuild@latest
  1. Turn on manifest:
export default defineConfig({
  output: {
    manifest: true,
  },
  plugins: [pluginReact()],
})
  1. Change the entry index file to dynamic import:
// bootstrap.tsx
import React from 'react'
import ReactDOM from 'react-dom/client'

import App from './App'

const root = ReactDOM.createRoot(document.getElementById('root')!)

root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)
// index.tsx
import('./bootstrap')
@gary-Shen gary-Shen added the 🐞 bug Something isn't working label May 13, 2024
@chenjiahan chenjiahan self-assigned this May 13, 2024
@chenjiahan
Copy link
Member

Thanks, we will fix this issue in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants