Skip to content

Getting error using browserify #7

Open
@jaideepdas

Description

@jaideepdas

I am using vue cli browserify setup. I am getting error.
import errorDisplay from '../components/errorDisplay.vue'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'
My package.json looks like
{ "name": "xxx", "version": "0.1.0", "description": "xxx", "author": "xxx", "private": true, "scripts": { "watchify": "watchify -vd -p browserify-hmr -e src/main.js -o dist/build.js", "serve": "http-server -o -c 1 -a localhost", "dev": "npm-run-all --parallel watchify serve", "build": "cross-env NODE_ENV=production browserify -g envify -p [ vueify/plugins/extract-css -o dist/build.css ] -e src/main.js | uglifyjs -c warnings=false -m > dist/build.js" }, "browserify": { "transform": [ [ "babelify", { "presets": [ "es2015", "stage-2" ] } ], "vueify" ] }, "browser": { "vue": "vue/dist/vue.common.js" }, "dependencies": { "lodash": "^4.17.4", "q": "^1.5.0", "vue": "^2.0.1", "vue-formly": "^2.5.0", "vue-formly-bootstrap": "^2.2.7", "vue-input-tag": "0.0.16", "vue-resource": "^1.3.4", "vue-router": "^2.7.0", "vue-strap": "github:wffranco/vue-strap", "vue2-filters": "^0.2.2" }, "devDependencies": { "babel-core": "^6.0.0", "babel-plugin-transform-runtime": "^6.0.0", "babel-preset-es2015": "^6.0.0", "babel-preset-stage-2": "^6.0.0", "babel-runtime": "^6.0.0", "babelify": "^7.2.0", "browserify": "^13.1.0", "browserify-hmr": "^0.3.1", "cross-env": "^2.0.0", "envify": "^3.4.1", "http-server": "^0.9.0", "npm-run-all": "^2.3.0", "proxyquireify": "^3.0.1", "uglify-js": "^2.5.0", "vueify": "^9.0.0", "watchify": "^3.4.0" } }

Not sure why its failing to bundle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions