[Vuejs]-Unexpected keyword 'import' in WebPack Django and Vue.js project

0👍

It turned out the issue was the version of the webpack and related libraries. The full solution is done and posted here: https://github.com/mikebz/djangovue

{
  "name": "djangovue",
  "version": "0.0.0",
  "description": "",
  "main": "index.js",
  "author": "Mike Borozdin",
  "license": "MIT",
  "scripts": {
    "build": "cross-env NODE_ENV=prod webpack --progress --config webpack.config.js",
    "watch": "cross-env NODE_ENV=dev webpack --progress --config webpack.config.js --watch"
  },
  "devDependencies": {
    "babel": "^6.23.0",
    "babel-core": "^6.26.0",
    "babel-loader": "^6.1.2",
    "babel-preset-env": "^1.6.0",
    "babel-preset-es2015": "^6.24.1",
    "cross-env": "^5.0.5",
    "css-loader": "^0.28.7",
    "file-loader": "^0.11.2",
    "node-libs-browser": "^0.5.0",
    "vue-loader": "^12.2.2",
    "vue-template-compiler": "^2.4.2",
    "webpack": "^3.5.6",
    "webpack-bundle-tracker": "0.0.5",
    "webpack-dev-server": "^2.8"
  },
  "dependencies": {
    "vue": "^2.4.2"
  }
}

Leave a comment