Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Webpack build error #48

Closed
knagyorg opened this issue Oct 30, 2017 · 6 comments
Closed

Webpack build error #48

knagyorg opened this issue Oct 30, 2017 · 6 comments

Comments

@knagyorg
Copy link

knagyorg commented Oct 30, 2017

Hi, I set up empty vuejs webpack project and add vue2-simplert component. But when I build project, I get error:
ERROR in static/js/vendor.9cdb516fd1e83e5588b9.js from UglifyJs
Unexpected token: operator (>) [./node_modules/vue2-simplert/src/main-dist.js:4,0][static/js/vendor.9cdb516fd1e83e5588b9.js:27114,16]

How to reproduce:

vue init webpack my-project
cd my-project
npm install
npm install vue2-simplert --save

use simplert in App.vue

npm run dev   -> app works

npm run build  -> build fails
@mazipan
Copy link
Owner

mazipan commented Oct 30, 2017

Can you share version you used ?
I suggest to use latest version.

@knagyorg
Copy link
Author

Yes, it's the latest version.
I include my package.json file for clear

{
  "name": "testsimplert",
  "version": "1.0.0",
  "description": "A Vue.js project",
  "author": "Karel Nagy <knagyorg@gmail.com>",
  "private": true,
  "scripts": {
    "dev": "node build/dev-server.js",
    "start": "npm run dev",
    "build": "node build/build.js"
  },
  "dependencies": {
    "vue": "^2.5.2",
    "vue2-simplert": "^0.5.7"
  },
  "devDependencies": {
    "autoprefixer": "^7.1.2",
    "babel-core": "^6.22.1",
    "babel-loader": "^7.1.1",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-preset-env": "^1.3.2",
    "babel-preset-stage-2": "^6.22.0",
    "babel-register": "^6.22.0",
    "chalk": "^2.0.1",
    "connect-history-api-fallback": "^1.3.0",
    "copy-webpack-plugin": "^4.0.1",
    "css-loader": "^0.28.0",
    "eventsource-polyfill": "^0.9.6",
    "express": "^4.14.1",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^1.1.4",
    "friendly-errors-webpack-plugin": "^1.6.1",
    "html-webpack-plugin": "^2.30.1",
    "http-proxy-middleware": "^0.17.3",
    "webpack-bundle-analyzer": "^2.9.0",
    "semver": "^5.3.0",
    "shelljs": "^0.7.6",
    "opn": "^5.1.0",
    "optimize-css-assets-webpack-plugin": "^3.2.0",
    "ora": "^1.2.0",
    "rimraf": "^2.6.0",
    "url-loader": "^0.5.8",
    "vue-loader": "^13.3.0",
    "vue-style-loader": "^3.0.1",
    "vue-template-compiler": "^2.5.2",
    "portfinder": "^1.0.13",
    "webpack": "^3.6.0",
    "webpack-dev-middleware": "^1.12.0",
    "webpack-hot-middleware": "^2.18.2",
    "webpack-merge": "^4.1.0"
  },
  "engines": {
    "node": ">= 4.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

@mazipan
Copy link
Owner

mazipan commented Oct 30, 2017

Can you upgrade to 0.5.8 ?

@knagyorg
Copy link
Author

Yes, now it works
Thanks a lot

@mazipan
Copy link
Owner

mazipan commented Oct 30, 2017

Have you try this repo : https://github.com/mazipan/vue2-simplert-plugin
It's easier to use in complex project.
All migration process also have been documented there

@knagyorg
Copy link
Author

Thanks for the link - I'll take a look at it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants