-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParseError: Unexpected token when trying to import #2
Comments
Can you provide the code? |
Main.js (using browserify/vueify) var Vue = require('vue');
Vue.use(require('vue-resource'));
import PulseLoader from 'vue-spinner/src/PulseLoader.vue';
new Vue({
el: '#app',
components: {
PulseLoader
}
}); If I copy the contents from PulseLoader.vue to my own component dir it loads fine. I'm guessing there's some problem with my build tool chain. |
Please turn on vue debugging mode to see the error log. |
Its because browserify will not pass included files from the node_modules folder to its transformers (vueify). import { PulseLoader } from 'vue-spinner/dist/vue-spinner.min'; As an import line should work. var PulseLoader= require('vue-spinner/dist/vue-spinner.min').PulseLoader; If you want to use CommonJS. |
Thank you @cyberdummy . I had update the README. |
I'm getting the below error when trying to import any of the loaders. I've tried to create my own components with the same contents and that works fine.
The text was updated successfully, but these errors were encountered: