Skip to content
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

vue-loader 13 compatible ? #28

Closed
Blatty opened this issue Jul 21, 2017 · 4 comments
Closed

vue-loader 13 compatible ? #28

Blatty opened this issue Jul 21, 2017 · 4 comments
Labels

Comments

@Blatty
Copy link

Blatty commented Jul 21, 2017

After upgrading to Vue 2.4 & vue-loader 13.x, all my sweet-modal components are not working:

[Vue warn]: Failed to mount component: template or render function not defined.

found in

---> <SweetModal>
       <Hello> at src/components/Hello.vue
          <App> at src/App.vue
            <Root>
vue.esm.js?efeb:566 TypeError: this.$refs.mobileMenu.close is not a function

Am I the only one getting this error? How to fix it?

@Blatty Blatty changed the title Vue 2.4 compatible ? vue-loader 13 compatible ? Jul 23, 2017
@Novarg
Copy link

Novarg commented Jul 31, 2017

According to https://github.com/vuejs/vue-loader/releases v13 breaking changes section

Similarly, old CommonJS-style requires will also need to be updated:
// before
const Foo = require('./Foo.vue')

// after
const Foo = require('./Foo.vue').default

So main.js should be like this:

var SweetModal = require('./components/SweetModal.vue').default
var SweetModalTab = require('./components/SweetModalTab.vue').default

module.exports = {
	SweetModal: SweetModal,
	SweetModalTab: SweetModalTab
}

@Blatty
Copy link
Author

Blatty commented Aug 2, 2017

Thanks @Novarg, that helped & resolved my issue!

@Blatty Blatty closed this as completed Aug 2, 2017
@Novarg
Copy link

Novarg commented Aug 2, 2017

@Blatty can you reopen ticket so package author can be aware and make appropriate changes?

@Blatty Blatty reopened this Aug 3, 2017
@bluefirex bluefirex added the bug label Aug 7, 2017
@bluefirex
Copy link
Member

Fixed in 79bf59e, released in v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants