-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
File watch mode. #2280
Comments
There is more. Documentation states that Rspack provides watch mode: https://www.rspack.dev/config/watch.html#watch But when I try to use that, I got an error:
|
@SoonIter I think what |
I think I know what you mean. I don't use this command very often. |
@boldurean The status quo of Rspack does not align with webpack, which I think is a mistake. Webpack, by default, will respect the environment variables and mode, etc, however, it is hardcoded
Would you take a look at this again @SoonIter? |
@h-a-n-a yep, I respect the targets and totally agree with them. I just find rspack very perspective and want as more people use it especially those like me who cannot shut down webpack from their production because non of the other current solutions provide same functionality. Let me try to explain the problem that can be solved if this feature will be included. Lots backend frameworks provide their dev server. As an example ASP.NET core has .cshtml embedded templates and run those in the memory. So you cannot point to the index.html file from the client side. All you have to do is to run the bundler on the client in --watch mode in order to watch for file changes and output them to the selected directory as per config file. This mode doesn't require any build optimizations it just need to input some .jsx/.tsx/js/ts files transpile -> output. |
Not really. Looks like |
Thank you for your feedback. |
@SoonIter thank you! |
What problem does this feature solve?
There is no way to turn on watch mode analogue to webpack --watch for just transpile jsx and output it to folder.
Imagine people are not running client dev server but they still need to transpile .jsx/.tsx files and output them to the dist directory. This problem happens when project is configured with other backend frameworks like ASP.NET which runs razor templates.
What does the proposed API of configuration look like?
rspack --watch
- will just watch file changes and will translie&output to the "output" folder once files change.The text was updated successfully, but these errors were encountered: