ERROR in TypeError: __webpack_require__(...) is not a function
- es6.regexp.replace.js?:2 eval
[.]/[core-js]/modules/es6.regexp.replace.js?:2:90
Instructions in the README.
Basically just:
"devDependencies": {
"@babel/core": "^7.0.0-beta.40",
"@babel/polyfill": "^7.0.0-beta.40",
"@babel/preset-env": "^7.0.0-beta.40",
"@babel/preset-react": "^7.0.0-beta.40",
"@babel/preset-stage-0": "7.0.0-beta.40",
"babel-eslint": "^8.2.1",
"babel-jest": "^22.4.0",
"babel-loader": "^8.0.0-beta.0",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"clean-webpack-plugin": "^0.1.18",
"compression-webpack-plugin": "^1.1.7",
"eslint": "^4.18.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.12.2",
"eslint-plugin-react": "^7.7.0",
"file-loader": "^1.1.8",
"html-webpack-plugin": "webpack-contrib/html-webpack-plugin",
"img-loader": "^2.0.1",
"jest": "^22.4.0",
"lodash-es": "^4.17.5",
"open-browser-webpack-plugin": "^0.0.5",
"url-loader": "^0.6.2",
"webpack": "^4.0.0-beta.2",
"webpack-bundle-analyzer": "^2.10.0",
"webpack-cli": "^2.0.6",
"webpack-notifier": "^1.5.1"
}
What is the current behavior?
I'm trying to migrate from webpack@3 to webpack@4 with a simple config (https://github.com/damianobarbati/yarsk/blob/master/config/webpack.config.js) but I get:
The bundle analyzer shows that full
lodash-esis included into the bundle and no tree shaking is happening.If the current behavior is a bug, please provide the steps to reproduce.
Here the full repro: https://github.com/damianobarbati/yarsk
Instructions in the README.
Basically just:
git clone https://github.com/damianobarbati/yarskyarn installnpm install -g pm2yarn build:devVersions: