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]: The production environment page crashes and reports TypeError when the version is upgraded to 1.0.0-alpha.5 #7293

Open
Zzzdy-code opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working need reproduction

Comments

@Zzzdy-code
Copy link

Zzzdy-code commented Jul 24, 2024

System Info

System:
OS: Ubuntu 20.04.6 LTS
Memory: 31.00 GB
Binaries:
Node: 18.20.3
npm: 10.7.0
Browsers:
Chrome: 112.0.5615.121
npmPackages:
"@rspack/cli": "^1.0.0-alpha.5",
"@rspack/core": "^1.0.0-alpha.5",
"@rspack/dev-server": "^1.0.0-alpha.5",
"@rspack/plugin-react-refresh": "^1.0.0-alpha.5",

Details

When I upgraded rspack to 1.0.0-alpha.5, my code worked fine in the development environment, but when I deployed to the production environment, the page crashed with a white screen.
This error can be simulated and reproduced in the local development environment by opening the build product page.
This is a local simulation reproduction.
image
This is the production environment.
image
image
It only appear in the production environment.When I changed the mode to another environment, the product was fine.

const base = require('./rspack.base');

module.exports = {
  ...base,
  mode: 'production', // change to another environment, the product was fine
  entry: {
    'cache-polyfill': 'cache-polyfill.js',
    index: 'entry.tsx',
  },
  output: {
    ...base.output,
    filename: '[name].[contenthash].js',
  },
  optimization: {
    minimize: true,
  },
};

Reproduce link

No response

Reproduce Steps

  1. Run npm run build
  2. open the index.html in /dist
    This problem occurs in rspack1.0.0-alpha.0 and later versions.
@Zzzdy-code Zzzdy-code added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jul 24, 2024
@Zzzdy-code Zzzdy-code changed the title [Bug]: [Bug]: The production environment page crashes and reports TypeError when the version is upgraded to 1.0.0-alpha.5 Jul 24, 2024
@jerrykingxyz jerrykingxyz added need reproduction and removed pending triage The issue/PR is currently untouched. labels Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

Hello @Zzzdy-code, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

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

No branches or pull requests

2 participants