![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.
@zurichversicherung/webpack-combine-loaders
Advanced tools
Converts an array of loaders defined using the `{loader, query}` object syntax into a single loader string. Useful for dealing with plugins which only understand the loader string syntax.
Converts an array of loaders defined using the {loader, query}
object syntax into a single loader string. Useful for dealing with plugins which only understand the loader string syntax.
combineLoaders([
{
loader: 'css-loader',
query: {
modules: true,
sourceMap: true,
localIdentName: '[name]__[local]--[hash:base64:5]',
},
},
{
loader: 'sass-loader',
query: {
sourceMap: true,
includePaths: [
'app/assets/stylesheets',
'app/assets/stylesheets/legacy',
],
},
},
]);
// => 'css-loader?modules=true&sourceMap=true&localIdentName=[name]__[local]--[hash:base64:5]!sass-loader?sourceMap=true&includePaths[]=app/assets/stylesheets&includePaths[]=app/assets/stylesheets/legacy'
Say you have multiple loaders being applied to the same file format, and you are using the object syntax for specifying the loader query params (because it's more composable than the string form), but then you need to pass them to a plugin which only understands loaders in their string form (ExtractTextPlugin, I'm looking at you)...
[
{
test: /\.scss$/,
exclude: /node_modules/,
loader: 'css-loader',
query: {
modules: true,
sourceMap: devBuild,
localIdentName: '[name]__[local]--[hash:base64:5]',
},
},
{
test: /\.scss$/,
exclude: /node_modules/,
loader: 'sass-loader',
query: {
sourceMap: devBuild,
includePaths: [
path.resolve('app/assets/stylesheets'),
path.resolve('app/assets/stylesheets/legacy'),
],
},
},
}
]
Instead, make a combined loader like so:
{
test: /\.scss$/,
exclude: /node_modules/,
// multiple css loaders are combined into one because ExtractTextPlugin
// only understands loaders in string form :(
loader: combineLoaders([
{
loader: 'css-loader',
query: {
modules: true,
sourceMap: devBuild,
localIdentName: '[name]__[local]--[hash:base64:5]',
},
},
{
loader: 'sass-loader',
query: {
sourceMap: devBuild,
includePaths: [
path.resolve('app/assets/stylesheets'),
path.resolve('app/assets/stylesheets/legacy'),
],
},
},
]),
}
FAQs
Converts an array of loaders defined using the `{loader, query}` object syntax into a single loader string. Useful for dealing with plugins which only understand the loader string syntax.
We found that @zurichversicherung/webpack-combine-loaders demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.