
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
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
The npm package webpack-modernizr-loader receives a total of 5,288 weekly downloads. As such, webpack-modernizr-loader popularity was classified as popular.
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.