Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
storefront-webpack-config
Advanced tools
var generateConfig = require('storefront-webpack-config');
var hotify = require('storefront-webpack-config/lib/hotify');
// Generate a config passing options
var config = generateConfig({ css: 'less' });
// Set your entry points
config.entry = {
'HomePage': ['./src/pages/HomePage/index.js'],
'ProductPage': ['./src/pages/ProductPage/index.js'],
'editors/index': ['./src/editors/index.js']
};
// Use hotify to enable hot loader
module.exports = hotify(config);
Since storefront-webpack-config
just generate a configuration for Webpack. You should install some required packages and some optional packages.
You should install this packages as dev dependencies.
npm install --save-dev webpack webpack-hot-middleware eslint svgo babel-core@5 \
babel-plugin-react-transform eslint-plugin-react react-transform-catch-errors react-transform-hmr redbox-react babel-eslint \
css-loader@0.14 style-loader babel-loader@5 url-loader eslint-loader file-loader raw-loader svgo-loader
css
You can set which CSS preprocessor you want with the css
option.
var config = generateConfig({ css: 'less' });
Option | Required packages | File extensions |
---|---|---|
less | less-loader | .less |
sass | sass-loader | .sass or .scss |
stylus | stylus-loader | .styl |
extractCSS
You can set to true
to generate CSS in a separate output.
var config = generateConfig({ extractCSS: true });
Option | Required packages |
---|---|
true | extract-text-webpack-plugin@brenoc/extract-text-webpack-plugin |
false |
commons
You can set to true to create a commons.js
file with the common modules between the entry points. This is a good option for big apps.
var config = generateConfig({ commons: true });
MIT
FAQs
Default storefront webpack config
The npm package storefront-webpack-config receives a total of 0 weekly downloads. As such, storefront-webpack-config popularity was classified as not popular.
We found that storefront-webpack-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.