Closed Hypnosphi closed 6 years ago
Describe the bug
void returnfalse code is produced, referring to a non-existent returnfalse variable.
void returnfalse
returnfalse
To Reproduce
Minimal code to reproduce the bug
const getFoo = () => { if (process.env.NODE_ENV === 'development') { console.log('dev') } return 'foo' } console.log(getFoo())
Actual Output
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(o,n,w){console.log(void returnfalse)}],[[0,1]]]);
Expected Output
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(o,n,w){console.log('foo')}],[[0,1]]]);
Configuration
https://github.com/Hypnosphi/minify-returnfalse-repro/blob/master/webpack.config.js
Downgrading webpack to ~4.21.0 helps
~4.21.0
OK looks like it's actually a webpack issue https://github.com/webpack/webpack/issues/8269
Describe the bug
void returnfalse
code is produced, referring to a non-existentreturnfalse
variable.To Reproduce
Minimal code to reproduce the bug
Actual Output
Expected Output
Configuration
https://github.com/Hypnosphi/minify-returnfalse-repro/blob/master/webpack.config.js