D
D
dotruger372021-04-11 19:19:53
webpack
dotruger37, 2021-04-11 19:19:53

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


Such dependencies

{
  "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"
  },
}


Content of webpack.config.js

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

1 answer(s)
A
Alice, 2021-04-11
@w3bsmes

Hold

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question