cssinjs / jss-loader

JSS Loader for Webpack
MIT License
65 stars 8 forks source link

webpack 4.16.5 unknown property 'jssLoader' #5

Open ComLock opened 6 years ago

ComLock commented 6 years ago

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

Perhaps the following is the correct syntax in Webpack 4?

import jssCamelCase from 'jss-camel-case';
import jssDefaultUnit from 'jss-default-unit';
import jssGlobal from 'jss-global';
import jssNested from 'jss-nested';
import jssPropsSort from 'jss-props-sort';
import jssVendorPrefixer from 'jss-vendor-prefixer';

...
use: [
                {
                    loader: 'jss-loader', // compiles JSS to CSS
                    options: {
                        plugins: [
                            jssCamelCase,
                            jssDefaultUnit,
                            //jssGlobal,
                            jssNested,
                            jssPropsSort,
                            jssVendorPrefixer
                        ]
                    }
                }
            ]
...