{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/6544","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/6544/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/6544/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/6544/events","html_url":"https://github.com/webpack/webpack/issues/6544","id":299034864,"number":6544,"title":"webpack@4 - ERROR in   TypeError: __webpack_require__(...) is not a function and sideEffects/tree-shaking ignored","user":{"login":"damianobarbati","id":2225869,"avatar_url":"https://avatars2.githubusercontent.com/u/2225869?v=4","gravatar_id":"","url":"https://api.github.com/users/damianobarbati","html_url":"https://github.com/damianobarbati","followers_url":"https://api.github.com/users/damianobarbati/followers","following_url":"https://api.github.com/users/damianobarbati/following{/other_user}","gists_url":"https://api.github.com/users/damianobarbati/gists{/gist_id}","starred_url":"https://api.github.com/users/damianobarbati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianobarbati/subscriptions","organizations_url":"https://api.github.com/users/damianobarbati/orgs","repos_url":"https://api.github.com/users/damianobarbati/repos","events_url":"https://api.github.com/users/damianobarbati/events{/privacy}","received_events_url":"https://api.github.com/users/damianobarbati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-21T16:20:33Z","updated_at":"2018-02-22T18:30:43Z","closed_at":null,"author_association":"NONE","body":"**What is the current behavior?**\r\nI'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:\r\n```\r\nERROR in   TypeError: __webpack_require__(...) is not a function\r\n  - es6.regexp.replace.js?:2 eval\r\n    [.]/[core-js]/modules/es6.regexp.replace.js?:2:90\r\n```\r\n\r\nThe bundle analyzer shows that full `lodash-es` is included into the bundle and no tree shaking is happening.\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\nHere the full repro: https://github.com/damianobarbati/yarsk\r\n\r\nInstructions in the README.\r\nBasically just:\r\n- `git clone https://github.com/damianobarbati/yarsk`\r\n- `yarn install`\r\n- `npm install -g pm2`\r\n- `yarn build:dev`\r\n\r\nVersions:\r\n```\r\n\"devDependencies\": {\r\n    \"@babel/core\": \"^7.0.0-beta.40\",\r\n    \"@babel/polyfill\": \"^7.0.0-beta.40\",\r\n    \"@babel/preset-env\": \"^7.0.0-beta.40\",\r\n    \"@babel/preset-react\": \"^7.0.0-beta.40\",\r\n    \"@babel/preset-stage-0\": \"7.0.0-beta.40\",\r\n    \"babel-eslint\": \"^8.2.1\",\r\n    \"babel-jest\": \"^22.4.0\",\r\n    \"babel-loader\": \"^8.0.0-beta.0\",\r\n    \"case-sensitive-paths-webpack-plugin\": \"^2.1.1\",\r\n    \"clean-webpack-plugin\": \"^0.1.18\",\r\n    \"compression-webpack-plugin\": \"^1.1.7\",\r\n    \"eslint\": \"^4.18.0\",\r\n    \"eslint-loader\": \"^1.9.0\",\r\n    \"eslint-plugin-import\": \"^2.8.0\",\r\n    \"eslint-plugin-jest\": \"^21.12.2\",\r\n    \"eslint-plugin-react\": \"^7.7.0\",\r\n    \"file-loader\": \"^1.1.8\",\r\n    \"html-webpack-plugin\": \"webpack-contrib/html-webpack-plugin\",\r\n    \"img-loader\": \"^2.0.1\",\r\n    \"jest\": \"^22.4.0\",\r\n    \"lodash-es\": \"^4.17.5\",\r\n    \"open-browser-webpack-plugin\": \"^0.0.5\",\r\n    \"url-loader\": \"^0.6.2\",\r\n    \"webpack\": \"^4.0.0-beta.2\",\r\n    \"webpack-bundle-analyzer\": \"^2.10.0\",\r\n    \"webpack-cli\": \"^2.0.6\",\r\n    \"webpack-notifier\": \"^1.5.1\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/367775848","html_url":"https://github.com/webpack/webpack/issues/6544#issuecomment-367775848","issue_url":"https://api.github.com/repos/webpack/webpack/issues/6544","id":367775848,"user":{"login":"sokra","id":1365881,"avatar_url":"https://avatars0.githubusercontent.com/u/1365881?v=4","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T18:30:43Z","updated_at":"2018-02-22T18:30:43Z","author_association":"OWNER","body":"webpack-cli help also seem like a bug to me. Best report it to webpack-cli. In no longer happens when the html-webpack-plugin is removed."}}
{"actor":{"display_login":"sokra"}}