-
Notifications
You must be signed in to change notification settings - Fork 167
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
[Feature]: Split chunk & return the path #4462
Comments
Thanks for the feature request. While we understand your use case with The processing of worker files is specific to BullMQ's implementation, and we recommend handling this at the application level instead. |
Thank you for a quick response. |
Set // rsbuild.config.ts
export default defineConfig({
tools: {
rspack: {
module: {
parser: {
javascript: {
url: false,
},
},
},
},
},
}); |
This just disables the parsing, no? |
Correct, no chunk will be created. |
Is it possible to keep the URL parsing and just changing the type? instead of asset type to js/auto? |
Maybe It can be used with this?? |
|
I've tried: config.module.parser.javascript.worker = ['Worker from bullmq', '...']; without success, what is the correct syntax? |
What problem does this feature solve?
I've an intersting use-case, when bundling Node server.
There are some time
Workers
that expect to get a file path.I would like it to work exactly like rsbuild works which native worker_threads.
It would be cool it rsbuild / rspack would create a chunk from the
my_processor.ts
file, and pass the path to it. Just like it does with nativeworker_threads
.I've tested it, looks like it does creates a asset chunk from it, but it doesn't process the typescript.
What does the proposed API look like?
import { Worker } from 'bullmq'
worker = new Worker(queueName, new URL('/my_procesor.ts', import.meta.url));
The text was updated successfully, but these errors were encountered: