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

[Bug Report] Breaks when used in laravel mix compilation with webpack configuration #73

Closed
Geowan opened this issue Aug 5, 2019 · 1 comment

Comments

@Geowan
Copy link

Geowan commented Aug 5, 2019

Environment

Browsers: Chrome 75.0.3770.100
OS: Linux x86_64

Steps to reproduce

I have added the vuetify-loader in webpack mix like

 class VuetifyRules {
   webpackRules() {
    return  {
        test: /\.s(c|a)ss$/,
        use: [
            'vue-style-loader',
            'css-loader',
            {
                loader: 'sass-loader',
                options: {
                    implementation: require('sass'),
                    fiber: require('fibers'),
                    indentedSyntax: true // optional
                }
            }
        ]
    }
}
  }  

 const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin'); 
  mix.extend('vuetify', new VuetifyRules());
  mix.setPublicPath('web/');
  mix.js('app/app.js', 'web/app.js').webpackConfig({
   plugins: [
       new VuetifyLoaderPlugin()
    ],
 });

Expected Behavior

To compile without errors

Actual Behavior

Throws an error when used in the webpack plugins on laravel mix.
the error is :

 UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
at items.forEach.item (/node_modules/vuetify-loader/lib/loader.js:21:60)
at Set.forEach (<anonymous>)

By removing the plugins on laravel mix am getting the error Module build failed:
@content($material-light)
^
Invalid CSS after " @content": expected "}", was "($material-light); "
which as per the documentation you are supposed to add the vuetify loader plugin

Reproduction Link

@KaelWD
Copy link
Member

KaelWD commented Aug 5, 2019

Duplicate of #49

@KaelWD KaelWD marked this as a duplicate of #49 Aug 5, 2019
@KaelWD KaelWD closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants