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.

Vue CLI 'webpack' template doesn't work out of the box

See original GitHub issue

Version

2.4.0

Node and OS info

node 10.8.0 / yarn 1.7.0 / macOS 10.13.6

Steps to reproduce

mkdir testapp
cd testapp
vue init webpack
yarn install
yarn run dev

What is expected?

I expected the generated app to not throw errors and show a generic app placeholder.

What is actually happening?

The http://localhost:8080 browser viewport is blank and the console has an error:

[Vue warn]: 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 Root)

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
atunjeafolabicommented, Jul 23, 2019

Create a vue.config.js in the root of your project. Then copy the below code snippet into it

module.exports = {
    runtimeCompiler: true
  };

Don’t forget to re run npm run serve to effect it.

5reactions
nourspacecommented, Sep 6, 2018

By default, the generated webpack config has this

...
  resolve: {
    symlinks: false,
    alias: {
      '@': '/path/to/project/src',
      vue$: 'vue/dist/vue.runtime.esm.js'
    },
...

So I had to update vue.config.js to use use the compiler-included build instead.

// vue.config.js
module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        'vue$': 'vue/dist/vue.esm.js'
      }
    }
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue cli image wont load with webpack - Stack Overflow
The issue is with your image path. You can fix it with either using public folder and give it in path.
Read more >
Working with Webpack | Vue CLI
Simple Configuration #. The easiest way to tweak the webpack config is providing an object to the configureWebpack option in vue.config.js :.
Read more >
How to Migrate from Vue CLI to Vite - Vue School Blog
Step #1: Updating Dependencies ... The first step to migrating to Vite is to update the dependencies in package.json. We'll need to remove...
Read more >
Vue.js 2 Webpack-Simple hot reload doesn't work - Laracasts
I'm trying to set up my project with vue-cli based on the webpack-simple template. I'm using all of the default ... So out...
Read more >
Getting Started - BootstrapVue
Unlike V2, Vue CLI 3 doesn't use templates. ... Under the hood, Vue CLI uses webpack, so we can register the BootstrapVue plugin...
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