![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
a-css-loader
Advanced tools
> A css loader inspired by [webpack/css-loader](https://github.com/webpack/css-loader).
A css loader inspired by webpack/css-loader.
This loader is different than webpack/css-loader in the following ways.
$ npm install --save a-css-loader
Webpack 1
// webpack.config.js
module.exports = {
module: {
/* ... Omitted */
loaders: [
{
test: /\.css$/,
loader: 'a-css-loader',
query: {
/* These are the defaults */
camelize: false,
scopedNameFormat: '[local]--[hash:5]',
mode: 'pure'
}
}
]
}
};
CSS
/* @import will combine the css of imported files*/
@import './a-css-file';
/* @require are just an alias for @import.
They are useful when combining this loader with the sass loader because they allow you to bypass
sass's own @import
*/
@require './another-css-file';
/* These variables will be stored and exported as locals */
@value my-special-color '#ff00ff';
@value another-special-color from './colors.css';
.my-class {
composes: another from './another-css-file.css';
color: my-special-color;
}
JS
import cssModule from './my-css.css';
cssModule['my-special-color'] === '#ff00ff'; // true
cssModule['another-special-color'] === require('./colors.css')['another-special-color']; // true
cssModule['my-class'] === require('./another-css-file.css')['another'] + ' my-class--1a1b2'; // true
By default, most path references are resolved by webpack. The only exception is in url()
functions. To force them to use webpack to resolve the path, prepend the path with a ~
.
Example:
.my-class {
background: url('http://not-resolved-by-webpack.com/image')
}
.my-other-class {
background: url('~./path/resolved/by/webpack')
}
Name | Type | Description |
---|---|---|
camelize | boolean | Wether to export camelized versions of the keys |
scopedNameFormat | string | Format for class name. It leverages this. |
mode | enum | 'pure', 'global', or 'local' |
FAQs
Unknown package
The npm package a-css-loader receives a total of 1,582 weekly downloads. As such, a-css-loader popularity was classified as popular.
We found that a-css-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.