{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/6667","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/6667/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/6667/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/6667/events","html_url":"https://github.com/webpack/webpack/issues/6667","id":302108894,"number":6667,"title":"Strange webpack output.","user":{"login":"acupofspirt","id":1342726,"avatar_url":"https://avatars0.githubusercontent.com/u/1342726?v=4","gravatar_id":"","url":"https://api.github.com/users/acupofspirt","html_url":"https://github.com/acupofspirt","followers_url":"https://api.github.com/users/acupofspirt/followers","following_url":"https://api.github.com/users/acupofspirt/following{/other_user}","gists_url":"https://api.github.com/users/acupofspirt/gists{/gist_id}","starred_url":"https://api.github.com/users/acupofspirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acupofspirt/subscriptions","organizations_url":"https://api.github.com/users/acupofspirt/orgs","repos_url":"https://api.github.com/users/acupofspirt/repos","events_url":"https://api.github.com/users/acupofspirt/events{/privacy}","received_events_url":"https://api.github.com/users/acupofspirt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-04T18:28:55Z","updated_at":"2018-03-06T13:20:08Z","closed_at":null,"author_association":"NONE","body":"<!-- Please don't delete this template or we'll close your issue -->\r\n<!-- Before creating an issue please make sure you are using the latest version of webpack. -->\r\n<!-- Also consider trying the webpack@beta version, maybe it's already fixed. -->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). -->\r\n<!-- Issues which contain questions or support requests will be closed. -->\r\n\r\n**What is the current behavior?**\r\nWhen I upgraded Webpack from 3 to 4 I'v got strange output in dev mode:\r\n```\r\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].config.performance = \"development\"\"development\" !== 'production'\r\n                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nSyntaxError: Unexpected identifier\r\n```\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\nHere is config:\r\n``` js\r\nconst path = require('path'),\r\n      webpack = require('webpack'),\r\n      VueSSRServerPlugin = require('vue-server-renderer/server-plugin'),\r\n      CopyWebpackPlugin = require('copy-webpack-plugin')\r\n\r\nmodule.exports = {\r\n  mode: 'development',\r\n\r\n  entry: path.resolve(__dirname, './js/entry-server.js'),\r\n\r\n  output: {\r\n    path: path.resolve(__dirname, '../dist/server'),\r\n    libraryTarget: 'commonjs2',\r\n    filename: 'ssr-bundle.js'\r\n  },\r\n\r\n  target: 'node',\r\n\r\n  module: {\r\n    rules: [\r\n      {\r\n        test: /\\.vue?$/,\r\n        loader: 'vue-loader'\r\n      }\r\n    ]\r\n  },\r\n\r\n  plugins: [\r\n    new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/),\r\n    new webpack.DefinePlugin({\r\n      'API_PATH': '\"http://192.168.1.8:3001/api/\"'\r\n    }),\r\n    new VueSSRServerPlugin(),\r\n    new CopyWebpackPlugin([{from: './js/server'}])\r\n  ],\r\n\r\n  performance: {\r\n    maxEntrypointSize: 400000,\r\n    assetFilter: assetFilename => assetFilename.endsWith('.js')\r\n  },\r\n\r\n  devtool: false\r\n}\r\n```\r\n\r\nHere is part of code: \r\n``` js\r\nimport Vue from 'vue'\r\nVue.config.performance = process.env.NODE_ENV !== 'production'\r\n```\r\n\r\n<!-- A great way to do this is to provide your configuration via a GitHub gist. -->\r\n<!-- Best provide a minimal reproduceable repo -->\r\n<!-- If your issue is caused by a plugin or loader file the issue on the plugin/loader repo -->\r\n\r\n**What is the expected behavior?**\r\nOutput must be correсt without strange duplication.\r\n\r\n**If this is a feature request, what is motivation or use case for changing the behavior?**\r\nN/A\r\n**Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.**\r\nWin 7 x64\r\nNode 9.7.1\r\nWebpack 4.1"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/370778658","html_url":"https://github.com/webpack/webpack/issues/6667#issuecomment-370778658","issue_url":"https://api.github.com/repos/webpack/webpack/issues/6667","id":370778658,"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-03-06T13:20:08Z","updated_at":"2018-03-06T13:20:08Z","author_association":"OWNER","body":"You can send a PR to add a flag into the compiler to prevent calling run/watch when another run/watch is still running."}}
{"actor":{"display_login":"sokra"}}