Answer the question
In order to leave comments, you need to log in
What to do with BigInt is not defined webpack?
I'm trying to run the server locally using the webpack-serve command, but I'm getting this error
/node_modules/webpack/lib/optimize/SplitChunksPlugin.js:770
const ZERO = BigInt("0");
^
ReferenceError: BigInt is not defined
{
"version": "1.0.0",
"description": "<p align=\"center\"> <img class = \"wordz\" src = \"img/TitlePicture.png\" > </p>",
"main": "index.js",
"scripts": {
"start": "node server",
"tmpl": "puglatizer -d src/ -o src/templates.js",
"scss": "node-sass src/index.scss -o src/",
"prestart": "npm run scss && npm run tmpl",
"lint": "eslint src/",
"lint-fix": "eslint --fix src/",
"prepare": "husky install",
"build": "webpack",
"dev": "webpack serve --open --config ./webpack.config.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.17.1",
"node-sass": "^5.0.0",
"pug": "^3.0.2",
"puglatizer": "^1.1.9",
"tmpl": "^1.0.4"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.22.0",
"husky": "^5.1.3",
"lint-staged": "^10.5.4",
"webpack": "^5.31.2",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "^3.11.2"
},
}
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: './src/main.js',
output: {
filename: 'bundle.js',
path: '/src/dist'
},
optimization: {
minimize: true,
splitChunks: {
minChunks: Infinity,
chunks: 'all'
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question