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

Add webpack's fileReplacements option to rspack's project configuration #218

Closed
dgmachado opened this issue Apr 13, 2023 · 0 comments · Fixed by #231
Closed

Add webpack's fileReplacements option to rspack's project configuration #218

dgmachado opened this issue Apr 13, 2023 · 0 comments · Fixed by #231
Labels
enhancement New feature or request scope:rspack

Comments

@dgmachado
Copy link
Contributor

What problem does this feature solve?

The fileReplacements option can be configured in project.json file and consumed by the Webpack. It's desirable that this option is supported by Rspack.

fileReplacements
Replace files with other files in the build.

What does the proposed API of configuration look like?

         "production": {
          "optimization": true,
          "extractLicenses": true,
          "inspect": false,
          "fileReplacements": [
            {
              "replace": "apps/demo-api/src/environments/environment.ts",
              "with": "apps/demo-api/src/environments/environment.prod.ts"
            }
          ]
          "mode": "production",
          "sourceMap": false,
         }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope:rspack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants