-
-
Notifications
You must be signed in to change notification settings - Fork 451
Open
Description
Webpack Version:
"webpack": "^6.0.1",
Babel Core Version:
"@babel/preset-env": "^7.26.7",
Babel Loader Version:
9.1.3
I have this small code-snippet:
console.log(Number(2n**53n));
After bundling it with the following configuration:
const path = require('path');
module.exports = {
entry: './try_math_pow.js',
output: {
path: path.resolve(__dirname, './'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
};
The bundled file has:
console.log(Number(Math.pow(2n,53n)));
However Math.pow doesn't take BigInt parameters, hence the parameters should be fixed accordingly to the use of Math.pow or use simply exponent arithmetic operator.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels