-
Notifications
You must be signed in to change notification settings - Fork 406
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
Importing in Vue 2.5+ and Webpack 4 requires VueGoodTable.default in Vue.use() #354
Comments
@AndersSchmidtHansen this is interesting... because vue-good-table does export default: Did you import exactly like the installation guide? import VueGoodTablePlugin from 'vue-good-table';
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTablePlugin); can you show me how you're importing the plugin? |
@xaksis - Hmm, the import is exactly like in the installation guide. Well, I tried with both "VueGoodTablePlugin" and "VueGoodTable" as the import name, but that shouldn't make of much a difference, right? This is how it currently looks: import VueGoodTable from 'vue-good-table'
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTable.default) // .default was not necessary in Webpack 3 or 2. I'm leaning towards that it's something wrong in my Webpack 4 setup since your I'll tinker around with it some more. |
Ok, I'll keep this open for now... @AndersSchmidtHansen thank you for looking into it, please let me know if you find more deets on it. |
@xaksis - I can confirm that this was an issue with my Webpack configs when migrating from 3 to 4. Something got lost in translation. I would consider this issue closed. All's good with |
Issue Type (delete the irrelevant ones)
Specs
"vue": "^2.5.16"
"vue-loader": "^15.2.6"
"webpack": "^4.16.3"
What browser?
Chrome
Expected Behavior
Expected to not having to write
Vue.use(VueGoodTable.default)
instead of the usualVue.use(VueGoodTable)
.Actual Behavior
Console errored with
Steps to Reproduce the Problem
Please detail your steps here
vue-good-table
fails to render unlessVueGoodTable.default
is used.Question
Will it be possible to upgrade
vue-good-table
to avoid having to use.default
when importing in Vue/Webpack projects that usevue-loader
versions that are newer than 13.0.0?You can see the issue addressed here. Evan You mentioned something like this:
It's fine for me to just use
.default
, but out of all my plugins used,vue-good-table
is the only one that doesn't work.Thanks for a great plugin, by the way, and thanks for all the hard work. 👍
The text was updated successfully, but these errors were encountered: