-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Labels
Description
- Rollup Plugin Name: @rollup/plugin-replace
- Rollup Plugin Version: 4.0.0
- Rollup Version: 2.70.2
- Operating System (or Browser):
- Node Version:
- Link to reproduction (
⚠️ read below): https://github.com/privatenumber/issue-reproductions/tree/master/reproductions/rollup/plugins/1178
Input
index.js
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') {
console.log('production');
}Expected Behavior
@rollup/plugin-replace README says the output should be:
if ('object' !== 'undefined' && 'production' === 'production') {
console.log('production');
}Actual Behavior
typeof process is not replaced.
Output
if (typeof process !== 'undefined' && "production" === 'production') {
console.log('production');
}Additional Information
There is no regression. Looks like the feature was merged when it was not working: #1084 (comment)