Skip to content

Postcss-loader fails to properly map/load hashed scss files #8

@paulbuechner

Description

@paulbuechner

SCSS file not beeing loaded properly

Remaining issue is the improper loading of component based scss files, which are handled in extra-webpack.config.js.

  • Support of proper style compiling for component based scss files added [open]

The issue hasn't beeing addressed yet. Will add more information later. Current compiling status: successfull compilation

Possible source of error: extra-webpack.config.js line 8 ff.

/*  SCSS EXTEND */
    const scssRule = config.module.rules.find(x => x.test.toString().includes('scss'));
    const postcssLoader = scssRule.use.find(x => x.loader.toString().includes('postcss-loader'));
    const pluginFunc = postcssLoader.options.postcssOptions.plugins;
    const newPluginFunc = function () {
        var plugs = pluginFunc.apply(this, arguments);
        plugs.splice(plugs.length - 1, 0, postcssModules({ generateScopedName: "[hash:base64:5]" }));
        return plugs;
    }
    postcssLoader.options.postcssOptions.plugins = newPluginFunc;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions