IE11: SCRIPT1003: Expected ':'
See original GitHub issueHello,
I’m having a few issues getting this component working in my app. Historically, I’ve never been able to include it via NPM (I’ve had to download the .zip release and import via the source files). It would seem as of version 1.7.0, I can’t do either.
My app is based on Laravel + Vue and I am using Laravel Mix 4.0.0.
Here are my issues:
Installing via npm (npm install vuejs-datatable
), I import the component:
import DatatableFactory from 'vuejs-datatable'
Then add it to Vue:
Vue.use(DatatableFactory);
By default, I get a “Cannot read property ‘use’ of undefined” error in Google Chrome. I also get this if I import vuejs-datatable from the source files (i.e.: import DatatableFactory from './vendor/vue-datatable'
).
Per issue #50, I added the following to my webpack.mix.js file:
mix.webpackConfig({
resolve: {
alias: {
'vuejs-datatable': 'vuejs-datatable/dist/vuejs-datatable.esm.js'
}
}
})
After recompiling the JavaScript, everything works in Google Chrome. However, Internet Explorer throws the following error:
SCRIPT1003: Expected ':'
File: app.js, Line: 118095, Column: 719
Here’s a screenshot of that line #:
Any thoughts if I’m doing something wrong, or if it’s a bug?
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Try import without vendor folder:
import DatatableFactory from ‘vuejs-datatable/dist/vuejs-datatable.esm.js’; Vue.use(DatatableFactory);
BTW, duplicate of #57