You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please tell us about your environment:
AWS Amplify
I am running into a weird bug using webpack/babel. I am experiencing a difference between how my code looks in the GUI where I wrote it and in the browser. I have an if statement that starts off something like this:
if (condition1 || condition2 || condition3) return;
after webpack bundling it looks like this, via the browser debuggers (firefox and chrome):
if (!(condition1 || condition2 || condition3)) return;
I'm submitting a bug report
Webpack Version:
5.70.0
Babel Core Version:
7.17.5
Babel Loader Version:
8.2.3
Please tell us about your environment:
AWS Amplify
I am running into a weird bug using webpack/babel. I am experiencing a difference between how my code looks in the GUI where I wrote it and in the browser. I have an if statement that starts off something like this:
if (condition1 || condition2 || condition3) return;
after webpack bundling it looks like this, via the browser debuggers (firefox and chrome):
if (!(condition1 || condition2 || condition3)) return;
It is completing negating the if statement.
excerpts from webpack file:
{
test: /.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
plugins: [
[
"@babel/plugin-transform-runtime",
{
"corejs": 3,
"helpers": true,
"regenerator": true
}
]
],
presets: [
'@babel/preset-env',
'@babel/preset-react'
]
}
},
}
..
output: {
filename: 'bundle.js',
publicPath: '/'
},
devServer: {
historyApiFallback:true
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.htm'
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
...
This is a bug being produced in a react project, in a component within a button click event.
The text was updated successfully, but these errors were encountered: