{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/101","labels_url":"https://api.github.com/repos/vuejs/vue-loader/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-loader/issues/101/comments","events_url":"https://api.github.com/repos/vuejs/vue-loader/issues/101/events","html_url":"https://github.com/vuejs/vue-loader/issues/101","id":122656806,"number":101,"title":"Question about config","user":{"login":"yozman","id":11918866,"avatar_url":"https://avatars.githubusercontent.com/u/11918866?v=3","gravatar_id":"","url":"https://api.github.com/users/yozman","html_url":"https://github.com/yozman","followers_url":"https://api.github.com/users/yozman/followers","following_url":"https://api.github.com/users/yozman/following{/other_user}","gists_url":"https://api.github.com/users/yozman/gists{/gist_id}","starred_url":"https://api.github.com/users/yozman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yozman/subscriptions","organizations_url":"https://api.github.com/users/yozman/orgs","repos_url":"https://api.github.com/users/yozman/repos","events_url":"https://api.github.com/users/yozman/events{/privacy}","received_events_url":"https://api.github.com/users/yozman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-17T04:01:41Z","updated_at":"2015-12-18T07:09:53Z","closed_at":null,"body":"First of all, I'm Chinese and writing code use Chinese as possible\r\nwhen I run `npm run build`, it will work on right\r\n```javascript\r\n// no problem\r\nif (process.env.NODE_ENV === 'production') {\r\n\texports.plugins = [\r\n\t\tnew webpack.DefinePlugin({\r\n\t\t\t'process.env': {\r\n\t\t\t\tNODE_ENV: '\"production\"'\r\n\t\t\t}\r\n\t\t}),\r\n\t\t// new webpack.optimize.UglifyJsPlugin({\r\n\t\t// \tcompress: {\r\n\t\t// \t\twarnings: false\r\n\t\t// \t}\r\n\t\t// }),\r\n\t\tnew webpack.optimize.OccurenceOrderPlugin()\r\n\t]\r\n}\r\n```\r\n\r\nwhen I try to use `UglifyJsPlugin`, it will send an error to me\r\n```javascript\r\n// problem\r\nif (process.env.NODE_ENV === 'production') {\r\n\texports.plugins = [\r\n\t\tnew webpack.DefinePlugin({\r\n\t\t\t'process.env': {\r\n\t\t\t\tNODE_ENV: '\"production\"'\r\n\t\t\t}\r\n\t\t}),\r\n\t\tnew webpack.optimize.UglifyJsPlugin({\r\n\t\t\tcompress: {\r\n\t\t\t\twarnings: false\r\n\t\t\t}\r\n\t\t}),\r\n\t\tnew webpack.optimize.OccurenceOrderPlugin()\r\n\t]\r\n}\r\n```\r\n\r\nthere is my `.vue` code\r\n```vue\r\n<template>\r\n\t<div :class=\"$options.name\">\r\n\t\t<div class=\"头部\">\r\n\t\t\t<M__头部></M__头部>\r\n\t\t</div>\r\n\t\t<div class=\"路线\">\r\n\t\t\t<M__路线></M__路线>\r\n\t\t</div>\r\n\t\t<div class=\"下单\">\r\n\t\t\t<M__下单></M__下单>\r\n\t\t</div>\r\n\t</div>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tcomponents: {\r\n\t\t\tM__头部: require('../m/头部.vue'),\r\n\t\t\tM__路线: require('../m/路线.vue'),\r\n\t\t\tM__下单: require('../m/下单信息.vue')\r\n\t\t},\r\n\t\tname: 'B__信息概览'\r\n\t}\r\n</script>\r\n```\r\n\r\nI check the error point is `<M__头部></M__头部>`\r\nbut the command `npm run dev` is work on right,\r\nproblem is only goes on `npm run build` with `UglifyJsPlugin`,\r\nwhen I change `.vue` like this\r\n```vue\r\n<template>\r\n\t<div :class=\"$options.name\">\r\n\t\t<div class=\"头部\">\r\n\t\t\t<my-head></my-head>\r\n\t\t</div>\r\n\t\t<div class=\"路线\">\r\n\t\t\t<M__路线></M__路线>\r\n\t\t</div>\r\n\t\t<div class=\"下单\">\r\n\t\t\t<M__下单></M__下单>\r\n\t\t</div>\r\n\t</div>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tcomponents: {\r\n\t\t\tMyHead: require('../m/头部.vue'),\r\n\t\t\tM__头部: require('../m/头部.vue'),\r\n\t\t\tM__路线: require('../m/路线.vue'),\r\n\t\t\tM__下单: require('../m/下单信息.vue')\r\n\t\t},\r\n\t\tname: 'B__信息概览'\r\n\t}\r\n</script>\r\n```\r\nthe script `npm run build` work on right.\r\n\r\nI want to fix it,\r\ncould you tell me what should I do?\r\n\r\nBy the way, when I use `uglifyjs -o -m` on console, it work on right,\r\nthe problem is only on `webpack` with `UglifyJsPlugin`"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/comments/165698189","html_url":"https://github.com/vuejs/vue-loader/issues/101#issuecomment-165698189","issue_url":"https://api.github.com/repos/vuejs/vue-loader/issues/101","id":165698189,"user":{"login":"yozman","id":11918866,"avatar_url":"https://avatars.githubusercontent.com/u/11918866?v=3","gravatar_id":"","url":"https://api.github.com/users/yozman","html_url":"https://github.com/yozman","followers_url":"https://api.github.com/users/yozman/followers","following_url":"https://api.github.com/users/yozman/following{/other_user}","gists_url":"https://api.github.com/users/yozman/gists{/gist_id}","starred_url":"https://api.github.com/users/yozman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yozman/subscriptions","organizations_url":"https://api.github.com/users/yozman/orgs","repos_url":"https://api.github.com/users/yozman/repos","events_url":"https://api.github.com/users/yozman/events{/privacy}","received_events_url":"https://api.github.com/users/yozman/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T07:09:53Z","updated_at":"2015-12-18T07:09:53Z","body":"哦哦，\r\n是这个库么？搜索了下，好多 html-minifier\r\nhttps://github.com/kangax/html-minifier\r\n\r\nBTW, 如果大神有时间解决下就更好啦 :smile: "}}