
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
webpack-modernizr-loader
Advanced tools
Get your modernizr build bundled with webpack, use modernizr with webpack easily
Get your modernizr build bundled with webpack.
$ npm install webpack-modernizr-loader --save-dev
There are three use case.
options
.const modernizr = require("modernizr");
webpack.config.js
module.exports = {
module: {
rules: [
{
loader: "webpack-modernizr-loader",
options: {
// Full list of supported options can be found in [config-all.json](https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json).
options: ["setClasses"],
"feature-detects": [
"test/css/flexbox",
"test/es6/promises",
"test/serviceworker"
]
// Uncomment this when you use `JSON` format for configuration
// type: 'javascript/auto'
},
test: /empty-alias-file\.js$/
}
]
},
resolve: {
alias: {
// You can add comment "Please do not delete this file" in this file
modernizr$: path.resolve(__dirname, "/path/to/empty-alias-file.js")
}
}
};
const modernizr = require("modernizr");
.modernizrrc.js
module.exports = {
options: ["setClasses"],
"feature-detects": [
"test/css/flexbox",
"test/es6/promises",
"test/serviceworker"
]
};
webpack.config.js
module.exports = {
module: {
rules: [
{
loader: "webpack-modernizr-loader",
test: /\.modernizrrc\.js$/
// Uncomment this when you use `JSON` format for configuration
// type: 'javascript/auto'
}
]
},
resolve: {
alias: {
modernizr$: path.resolve(__dirname, "/path/to/.modernizrrc.js")
}
}
};
const modernizr = require("modernizr");
webpack.config.js
module.exports = {
module: {
rules: [
{
loader: "webpack-modernizr-loader",
test: /\.modernizrrc\.js$/
// Uncomment this when you use `JSON` format for configuration
// type: 'javascript/auto'
}
]
}
};
Feel free to push your code if you agree with publishing under the MIT license.
5.0.0 - 2019-02-04
webpack
< 4node
< 6.9modernizr
version is now ^3.7.1
.FAQs
Get your modernizr build bundled with webpack, use modernizr with webpack easily
We found that webpack-modernizr-loader demonstrated a not healthy version release cadence and project activity because the last version was released 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.