
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
@stylable/experimental-loader
Advanced tools
This loader supports working with `mini-css-extract-plugin`. Internally, this setup uses two separate loaders.
This loader supports working with mini-css-extract-plugin
. Internally, this setup uses two separate loaders.
stylable-transform-loader
- responsible for Stylable transformations and generates the css-loader
compatible output that the mini-css-extract-plugin
expectsstylable-runtime-loader
- Stylable offers a richer module API compared to css modules. The css-loader
flow does not support this API, and so we are using this loader to convert the raw Stylable locals data to the appropriate runtime stylesheetThis loader is experimental and currently not the recommended way of integrating Stylable into your project.
Use @stylable/webpack-plugin
for the latest stable integration.
A minimal webpack configuration using the two Stylable loaders in conjunction with the mini-css-extract-plugin
loader:
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { stylableLoaders } = require('@stylable/experimental-loader');
module.exports = {
plugins: [new MiniCssExtractPlugin()],
module: {
rules: [
{
test: /\.st\.css$/i,
use: [
stylableLoaders.runtime(),
MiniCssExtractPlugin.loader,
stylableLoaders.transform(),
],
},
// load asset from CSS url()
{
test: /\.(png|jpg|gif)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
],
},
};
interface LoaderOptions {
resolveNamespace?(namespace: string, filePath: string): string;
filterUrls?(url: string, ctx: loader.LoaderContext): boolean;
exportsOnly?: boolean;
alwaysEmitErrors?: boolean;
}
Option | Description |
---|---|
resolveNamespace | override default stylesheet namespace process |
filterUrls | filter urls from webpack process |
exportsOnly | only export the runtime stylesheet |
alwaysEmitErrors | always emit Stylable diagnostics as errors |
When building Stylable for consumption in a server-side renderer build, you may want to extract only the exports of the runtime stylesheets and not the content of their CSS. In such a case you would only be required to use the transform
loader and the exportsOnly
option.
{
test: /\.st\.css$/i,
use: [
stylableLoaders.transform({ exportsOnly: true }),
],
}
As opposed to the current webpack-plugin integration, some behaviors are still missing, or lacking:
Copyright (c) 2021 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a MIT license.
FAQs
This loader supports working with `mini-css-extract-plugin`. Internally, this setup uses two separate loaders.
We found that @stylable/experimental-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.