Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need option to Handle all vue-loader option #106

Closed
SmileSmith opened this issue Dec 19, 2019 · 1 comment
Closed

Need option to Handle all vue-loader option #106

SmileSmith opened this issue Dec 19, 2019 · 1 comment

Comments

@SmileSmith
Copy link

Environment

vuetify Version: 2.1.0
vuetify-loader Version: 1.3.0
vue-cli Version: 3.0.3

Steps to reproduce

this is appear when integrate VuePress in my vuetify project. I found vuetify-component not inject import and register component by vuetify-loader. reference https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/markdown-loader

/ * my vuetify project  vue.config.js */

module.exports = {
  transpileDependencies: ['vuetify'],
  chainWebpack: config => {
    const rule = config.module.rule('markdown').test(/\.md$/)
    rule.use('vue-loader').loader('vue-loader');
    rule.use('markdown-loader').loader(require.resolve('@vuepress/markdown-loader'));
  }
}

Expected Behavior

@vuepress/markdown-loader and vuetify component all work

Actual Behavior

webpack compiler error. v-app-bar .etc vuetify component haven't register.

And If covert .loader('vue-loader'); to .loader('my-vue-loader'); (or any name else), vuetify-loader plugin work.

Then I found plugin.js only handle latest vue-loader options. I suggest an option to specific whether to handle all vue-loader option.

/* in vuetify-loader/lib/plugin.js 24-26 */

    // find the rule that applies to vue files
    const vueRuleIndex = rules.findIndex(rule => rule.use && rule.use.find(isVueLoader))
    const vueRule = rules[vueRuleIndex]
@bdiz
Copy link

bdiz commented Jul 8, 2020

I have the same issue. Using @EqualMa fix resolved the issue for me. Without a full understanding, I do wonder why not always handleAllVueLoaders instead of making it an option. @KaelWD looking forward for the fix to be released.

@KaelWD KaelWD closed this as completed in 9f0e669 Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants