Open mims92 opened 7 years ago
Hi,
I'm having trouble with browserify and Vue.js file when compiling with gulp-browserify:
gulp.task('scripts', ['clean'], function() { return gulp.src(paths.scripts) .pipe(sourcemaps.init()) .pipe(babel({ presets: ['es2015'] })) .pipe(browserify({ insertGlobals : true })) .pipe(concat('app.min.js')) .pipe(sourcemaps.write('.')) .pipe(gulp.dest('public/assets/js')); });
And I have an Example.vue
<template> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="panel panel-default"> <div class="panel-heading">Example Component</div> <div class="panel-body"> I'm an example component! </div> </div> </div> </div> </div> </template> <script> export default { mounted() { console.log('Component mounted.') } } </script>
When running the task with gulp, it throws Error: Parsing file /**/resources/assets/js/components/Example.vue: Line 19: Unexpected reserved word
Error: Parsing file /**/resources/assets/js/components/Example.vue: Line 19: Unexpected reserved word
Hi,
I'm having trouble with browserify and Vue.js file when compiling with gulp-browserify:
And I have an Example.vue
When running the task with gulp, it throws
Error: Parsing file /**/resources/assets/js/components/Example.vue: Line 19: Unexpected reserved word