https://github.com/domiii/webpack-plugin-order-test
https://github.com/domiii/webpack-plugin-order-test
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/domiii/webpack-plugin-order-test
- Owner: Domiii
- Created: 2021-05-27T09:38:52.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-27T12:37:17.000Z (about 5 years ago)
- Last Synced: 2025-03-11T01:52:56.850Z (over 1 year ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Run `npm start` to reproduce the problem:
1. It builds the same input file (`src/index.js`) in two different versions: (i) one modded with the custom `@dbux/babel-plugin`, (ii) one the original.
1. You see that if the babel plugin modifies the code, `webpack.DefinePlugin` fails to make the replacements.
1. Also note that it builds it once each for webpack versions v4 and v5. They have the same issue.
The final output (or a manual inspection of the output files in `dist`) indicate that replacement worked if no modification took place. It looks something like this:
> app-5.js: good
>
> app-5-modded.js: bad
>
> app-4.js: good
>
> app-4-modded.js: bad