ktquez/vue-extend-layout

Cli 3 don't work

bitsmakerde opened this issue · 4 comments

Hi,

i created a project with the cli 3 and i added with package with npm.

I added a vue-config.js file with this code:

module.exports = { configureWebpack: config => { if (process.env.NODE_ENV === 'production') { config.resolve.alias.vue$ = 'vue/dist/vue.min.js' } else { config.resolve.alias.vue$ = 'vue/dist/vue.js' } } }

But i get an error like this:

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.

That is my failure?

All other files i have created like the description.

Thank you

Add this to your vue.config.js

module.exports = {
  configureWebpack: config => {
    if (process.env.NODE_ENV === 'production') {
      config.resolve.alias.vue$ = 'vue/dist/vue.min.js'
    } else {
      config.resolve.alias.vue$ = 'vue/dist/vue.js'
    }
  }
}

I'll refactor the plugin to work with vue-cli 3 soon

I wrote this at My post. I habe do excalty this.

This Code dont work.

@bitsmakerde
I'll test and return with feedback for you.

@bitsmakerde
I created a branch using dynamic import (lazy load component) and using component
<vue-extend-layout /> into App.vue, it got better as well.

You can test
npm install -S ktquez/vue-extend-layout#2.0