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

Issues using with Quasar Framework #3

Closed
virtualvinodh opened this issue Jan 26, 2018 · 10 comments
Closed

Issues using with Quasar Framework #3

virtualvinodh opened this issue Jan 26, 2018 · 10 comments

Comments

@virtualvinodh
Copy link

Hi,

I am trying to use vue-konva within the Quasar framework. However, for some reason, the canvas is not being rendered and I get the following error.

You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

found in

---> <VLayer>

I am totally new to vuejs. Am I doing something completely wrong?

V

@Ldoppea
Copy link
Contributor

Ldoppea commented Jan 28, 2018

Hi,

I just got the same problem. This message is a warning (not an error) but vue-konva is not rendering.

This seems to be a side-effect of the last vue-cli release as vue-konva works well with a project generated with vue-cli v2.9.0 but not with vue-cli v3.0.0-alpha.4.

@rafaesc
Copy link
Member

rafaesc commented Jan 28, 2018

Hi,

try to add this alias in your webpack config

vuejs-templates/webpack#215 (comment)

@Ldoppea
Copy link
Contributor

Ldoppea commented Jan 29, 2018

The problem is that webpack is now managed by vue-cli and is hidden from project. I did not find any information on how to override it or how to eject it from the cli. The official documentation still refers to v2.9.0 cli.
Maybe it is to early to use the v3.0.0 alpha.

Virtualvinodh, are you using v3 or v2.9?

@virtualvinodh
Copy link
Author

Actually, I'm not using vue-cli. I'm using the cli from the framework.

https://www.npmjs.com/package/quasar-cli

I think it internally uses webpack (similar to vue-cli) to perform the compilation.

V

@rafaesc
Copy link
Member

rafaesc commented Jan 30, 2018

Hi @virtualvinodh,

I saw that in the path of library generated by quasar-cli, there is the webpack config where you have to add the alias
[quasar-project]/build/webpack.base.config.js
Like this
https://github.com/rafaesc/vue-konva/blob/master/build/webpack.base.conf.js#L27

On the other hand, @Ldoppea, you right, vue-cli v3.0.0 alpha doesn't expose the webpack config.

vuejs/vue-cli#747

@Ldoppea
Copy link
Contributor

Ldoppea commented Jan 30, 2018

Thanks for investigation, I hope they'll release the documentation soon.

@Ldoppea
Copy link
Contributor

Ldoppea commented Jan 31, 2018

They posted the documentation on their README.md.

To make it work, a vue.config.js should be created on the project's root, with the following content :

module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        'vue$': 'vue/dist/vue.js'
      }
    }
  },
  lintOnSave: true
}

Also the vue entry in package.json should be removed and its content must be added in vue.config.js next to configureWebpack (ex: lintOnSave).

This will be the procedure for all Vue-CLI 3.0 generated projects, so it would be useful to add a note in your README.md

@husayt
Copy link

husayt commented Feb 14, 2018

@rafaesc , what is advised above is essentially a workaround. Proper solution should be applied to vue-konva. This lib should configure it's own dist files down to render function i.e. should pre-compile templates when releasing dists.

Here is the advice in regards to the similar issue with different component.

nuxt/nuxt#1142

@MKRazz
Copy link
Contributor

MKRazz commented Apr 26, 2018

This should fix it #13

@rafaesc
Copy link
Member

rafaesc commented May 1, 2018

@MKRazz PR merged on 1.0.6 version

@lavrton lavrton closed this as completed Jul 31, 2019
lavrton pushed a commit that referenced this issue May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants