2

In my Vuepress project I would like to use v-runtime-template.

Their setup instruction says

You must use the with-compiler Vue.js version. This is needed in order to compile on-the-fly Vue.js templates. For that, you can set a webpack alias for vue to the vue/dist/vue.common file.

This could be achieved by adding

module.exports = {
  runtimeCompiler: true
};

to vue.config.js, but I do not understand how to configure in Vuepress.

I tried this:

// .vuepress/enhanceApp.js
export default ({ Vue, options, router, siteData }) => {
  Vue.config.runtimeCompiler = true
}

but it did not give any results. How should the configuration be done?

1 Answer 1

1

From: https://github.com/vuejs/vuepress/issues/402#issuecomment-388169056

Add the following to your .vuepress/config.js:

chainWebpack(config) {
  config.resolve.alias.set('vue', 'vue/dist/vue.common.js')
}

More info: https://vuepress.vuejs.org/config/#chainwebpack

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.