arktosk / vue-jss-plugin

JSS plugin implementation for Vue.js
MIT License
24 stars 1 forks source link

Invalid left-hand side in assignment #30

Closed emulienfou closed 3 years ago

emulienfou commented 3 years ago

Hello there, trying to use your package, however I've got this error message: Uncaught ReferenceError: Invalid left-hand side in assignment

Seems this error is related to this line of code and if I removed it, it's working perfectly:

process.env = process.env || {};

Here are my dependencies for my test project:

"dependencies": {
    "core-js": "^3.6.5",
    "vue": "^2.6.11",
    "vue-jss-plugin": "^1.2.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^6.2.2",
    "vue-template-compiler": "^2.6.11"
  }
arktosk commented 3 years ago

Hey, thanks for raising an issue. This for sure should be removed, have no reason to be heare, since webpack replaces whole "process.env.NODE_ENV" phrase.

@see ./src/index.js:8

arktosk commented 3 years ago

@emulienfou, just FYI, the issue is fixed now thanks to @uni-zheng!

uni-zheng commented 3 years ago

Hi, thank you too to bring jss into Vue. Hope you and other contributors can make more bravo feature in this.