question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting runtime-only build

See original GitHub issue

Hi. Great looking package here. I’m trying to use it in a vue app, but when I include the <vue-snotify></vue-snotify> component in my App.vue, I get a warning saying:

“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 —> <Snotify> …

In my main.js, i have:

import {Snotify} from 'vue-snotify';
Vue.use(Snotify)

And in App.vue, I put in:

<template>
  <div>
    <vue-snotify></vue-snotify>
    <div class="conteudo">
      <main>
        <router-view></router-view>
      </main>
    </div>
  </div>
</template>

Any ideas on what I may be doing wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
erodewaldcommented, Jun 20, 2018

I’m new to Vue, and this doesn’t seem to work out of the box with my vue-cli 3 template. @artemsky maybe the project needs to be updated to support it? Just thinking out loud, as I have not yet found a good solution for it that doesn’t include providing webpack resolve aliases for pretty much everything. Compilation fails otherwise.

edit: I was able to get it working fine, but only if I used the chainWebpack to set the alias in vue.config.js:

module.exports = {
  chainWebpack: config => {
    config.resolve.alias.set("vue$", "vue/dist/vue.esm.js");
  }
};
3reactions
arenddeboercommented, Nov 29, 2017

Thanks. I don’t know enough of Vue to give any advice, other than the downside of the added size if you include the compiler.

For others having this issue, I was able to get going again with this change in Webpack:

resolve: {
    alias: {
      vue$: 'vue/dist/vue.esm.js'
    }
  }

Thanks for an awesome package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle: compileOnly and runtimeOnly - Stack Overflow
we will get a smaller build size. runtimeOnly: when we want to change or swap the behaviour of the library at runtime (in...
Read more >
How Gradle Dependency Configurations Work Underhood
Here we will discuss four major configurations which include: implementation, api, compileOnly and runtimeOnly As a developer, we often need ...
Read more >
Declaring dependencies - Gradle User Manual
Such a configuration is there only to declare dependencies. The reason is that depending on the usage (compile classpath, runtime classpath), it can...
Read more >
Maven Scopes and Gradle Configurations Explained
A Maven pom.xml file or a Gradle build.gradle file specifies the steps ... The runtimeOnly configuration allows us to declare dependencies ...
Read more >
Add build dependencies - Android Developers
runtimeOnly, Gradle adds the dependency to the build output only, for use during runtime. That is, it is not added to the compile...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found