0.8.1 • Published 4 years ago
@akqa-frontline/js-config-webpack-plugin v0.8.1
@akqa-frontline/js-config-webpack-plugin
this package is not yet fully documented
JavaScript configuration for webpack.
What does it do
This package configures loaders for Webpack, optimization/minification, provides a Babel configuration with all the language features we support, and adds tools and utils to assist developing React applications.
Notable features
- Works with a Module / No Module setup out of the box
- Babel
- Class Properties
- Nullish Coalescing Operator
- Optional Chaining
- Dynamic Imports
- SVG as React Components
Install
Install this package and its peer dependencies:
npm install --save-dev --save-exact @akqa-frontline/js-config-webpack-plugin
npm install --save-dev --save-exact webpack
Usage
Add the plugin to your webpack configuration
// webpack.config.js
const {FrontlineJsConfigWebpackPlugin} = require("@akqa-frontline/js-config-webpack-plugin");
const moduleWebpackConfiguration = {
plugins: [
new FrontlineJsConfigWebpackPlugin({browserslistEnv: "modern"})
]
}
const noModuleWebpackConfiguration = {
plugins: [
new FrontlineJsConfigWebpackPlugin({browserslistEnv: "legacy"})
]
}
module.exports = [moduleWebpackConfiguration, noModuleWebpackConfiguration]
Take a look at webpack-config for instructions on a more complete Frontline webpack configuration.
Contributing
Please refer to the contributing document.
License
ISC © AKQA