{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/vue-loader/issues/131","labels_url":"https://api.github.com/repos/vuejs/vue-loader/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-loader/issues/131/comments","events_url":"https://api.github.com/repos/vuejs/vue-loader/issues/131/events","html_url":"https://github.com/vuejs/vue-loader/issues/131","id":126326878,"number":131,"title":"使用ES2015报错","user":{"login":"ikarosu","id":10465428,"avatar_url":"https://avatars.githubusercontent.com/u/10465428?v=3","gravatar_id":"","url":"https://api.github.com/users/ikarosu","html_url":"https://github.com/ikarosu","followers_url":"https://api.github.com/users/ikarosu/followers","following_url":"https://api.github.com/users/ikarosu/following{/other_user}","gists_url":"https://api.github.com/users/ikarosu/gists{/gist_id}","starred_url":"https://api.github.com/users/ikarosu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikarosu/subscriptions","organizations_url":"https://api.github.com/users/ikarosu/orgs","repos_url":"https://api.github.com/users/ikarosu/repos","events_url":"https://api.github.com/users/ikarosu/events{/privacy}","received_events_url":"https://api.github.com/users/ikarosu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-13T02:35:59Z","updated_at":"2016-01-13T02:35:59Z","closed_at":null,"body":"npm使用build报错\r\n`ERROR in ./src/main.js\r\n\r\nE:\\bzys\\Bzys\\Bzys\\src\\main.js\r\n  1:2  error  Parsing error: Illegal import declaration\r\n\r\n✖ 1 problem (1 error, 0 warnings)\r\n\r\n\r\nERROR in ./src/main.js\r\nModule parse failed: E:\\bzys\\Bzys\\Bzys\\node_modules\\babel-loader\\index.js!E:\\bzys\\Bzys\\Bzys\\node_modules\\eslint-loader\\index.js!E:\\bzys\\Bzys\\Bzys\\src\\main.js Line 1: Unexpected token\r\nYou may need an appropriate loader to handle this file type.\r\n| import Vue from 'vue';\r\n| import NavT from './components/navigation.vue';\r\n| // var Vue = require('vue')`\r\n我的`package.json`\r\n`...\r\n\"devDependencies\": {\r\n    \"babel-core\": \"^6.4.0\",\r\n    \"babel-loader\": \"^6.2.1\",\r\n    \"babel-plugin-transform-runtime\": \"^6.4.0\",\r\n    \"babel-preset-es2015\": \"^6.3.13\",\r\n    \"babel-preset-stage-0\": \"^6.3.13\",\r\n    \"babel-runtime\": \"^5.8.34\",\r\n    \"css-loader\": \"^0.23.1\",\r\n    \"eslint\": \"^1.10.3\",\r\n    \"eslint-loader\": \"^1.2.0\",\r\n    \"file-loader\": \"^0.8.5\",\r\n    \"function-bind\": \"^1.0.2\",\r\n    \"inject-loader\": \"^2.0.1\",\r\n    \"jade\": \"^1.11.0\",\r\n    \"jasmine-core\": \"^2.4.1\",\r\n    \"karma\": \"^0.13.19\",\r\n    \"karma-jasmine\": \"^0.3.6\",\r\n    \"karma-phantomjs-launcher\": \"^0.2.3\",\r\n    \"karma-spec-reporter\": \"0.0.23\",\r\n    \"karma-webpack\": \"^1.7.0\",\r\n    \"less-loader\": \"^2.2.2\",\r\n    \"phantomjs\": \"^1.9.19\",\r\n    \"stylus-loader\": \"^1.4.3\",\r\n    \"template-html-loader\": \"0.0.3\",\r\n    \"url-loader\": \"^0.5.7\",\r\n    \"vue-hot-reload-api\": \"^1.2.2\",\r\n    \"vue-html-loader\": \"^1.1.0\",\r\n    \"vue-loader\": \"^8.0.2\",\r\n    \"vue-style-loader\": \"^1.0.0\",\r\n    \"webpack\": \"^1.12.11\",\r\n    \"webpack-dev-server\": \"^1.14.1\"\r\n  },\r\n  \"dependencies\": {\r\n    \"vue\": \"^1.0.14\"\r\n  }`\r\n`main.js`\r\n`import Vue from 'vue';\r\nimport NavT from './components/navigation.vue';\r\n// var Vue = require('vue')\r\n// var NavT = require('./components/navigation.vue')\r\n\r\nnew Vue({\r\n  el: 'body',\r\n  components: { \r\n    \"nav-t\":NavT\r\n  }\r\n})`\r\nwebpack配置是和这个项目一样的，只要用下面注释那两句就正常"}}