Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

warning to precompile template when it appears to be properly compiled #230

Closed
@RwwL

Description

@RwwL

I see the [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. message in the console, but it doesn't make sense to me because when I look at my browserify build, the one and only component that I'm integrating into the app (a single-file .vue component called vue-upload-queue that lives in its own repo) appears to have been properly compiled... it has been babelified, it has a render function, etc.

The relevant portion of our browserify build process looks like

  if (config.debug !== true) {
    bundler.transform(envify({ NODE_ENV: 'production' }), { global: true });
  }
  bundler.transform(vueify, { global: true });
  bundler.transform(babelify, {
    global: true,
    presets: [['es2015']],
    extensions: ['.vue', '.js'],
    only: /\/node_modules\/(vue-upload-queue)\//,
  });

The vue that I'm including is Vue's dist/vue.runtime.js, and if I can get this working I'll tailor it so I have the minified version in the production build & unminified in development.

I'm sure I'm misunderstanding something about this whole process/setup, but I don't know yet what I don't know yet, so please let me know what other info I might need to provide to get some help, thanks.

The vue version is 2.5.16; vueify is 9.4.1.

UPDATE, after some more Googling I think I'm discovering that the issue may be with my root component. Looks like to use the runtime-only build I'll need to make sure that I'm not looking in the DOM for an <upload-queue> and instead creating a root app component with a render function — sound correct?

UPDATE 2, Yep, that was it. Here's the page that pointed me in the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions