How to use @stylable/webpack-plugin - 3 common examples

To help you get started, we’ve selected a few @stylable/webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix / stylable / packages / webpack-extensions / src / stylable-metadata-plugin.ts View on Github external
this.options.context || compilation.compiler.options.context || process.cwd(),
            this.options.name,
            this.options.version
        );

        for (const module of stylableModules) {
            const namespace = module.buildInfo.stylableMeta.namespace;
            const depth = module.buildInfo.runtimeInfo.depth;

            builder.addSource(
                module.resource,
                compilation.inputFileSystem.readFileSync(module.resource).toString(),
                { namespace, depth }
            );

            const component = getCSSComponentLogicModule(module);
            if (!component) {
                continue;
            }

            const componentConfig = this.loadComponentConfig(compilation, component);

            if (!componentConfig) {
                continue;
            }

            builder.addComponent(module.resource, componentConfig, namespace);

            this.handleVariants(
                componentConfig,
                dirname(module.resource),
                compilation,

@stylable/webpack-plugin

Webpack (5.x) plugin for Stylable modules

MIT
Latest version published 7 months ago

Package Health Score

62 / 100
Full package analysis

Similar packages