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]: output. fileName configuration has been changed, and the packaged JavaScript file is not compressed #6299

Closed
hatedMe opened this issue Apr 19, 2024 · 1 comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@hatedMe
Copy link

hatedMe commented Apr 19, 2024

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.69 GB / 23.79 GB
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE      
    Yarn: 1.22.21 - C:\Program Files\nodejs\yarn.CMD      
    npm: 10.3.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.14.1 - C:\Program Files\nodejs\pnpm.CMD       
  Browsers:
    Edge: Chromium (120.0.2210.61)
    Internet Explorer: 11.0.19041.3636

Details

Changing the output. fileName will result in the packaged JavaScript file not being compressed.
The following is an example configuration:

// rspack.config.js
const rspack = require("@rspack/core");
const config = {
   ...
   output: {
    filename: `[name].js?h=[contenthash:8]&t=${Date.now()}`
   }
   ...
 }
 module.exports = config;

image

Reproduce link

https://github.com/rspack-contrib/rspack-examples/tree/main/rspack/vue2

Reproduce Steps

1.rspack.config.js options add

output: {
		filename: `[name].js?h=[contenthash:8]&t=${Date.now()}`
	}
  1. run build
@hatedMe hatedMe added bug Something isn't working pending triage The issue/PR is currently untouched. labels Apr 19, 2024
@LingyuCoder
Copy link
Contributor

duplicated with #6212 and fixed by #6301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

2 participants