@akqa-frontline/js-config-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.8.1 • Public • Published

@akqa-frontline/js-config-webpack-plugin

GitHub npm (scoped)

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

Readme

Keywords

none

Package Sidebar

Install

npm i @akqa-frontline/js-config-webpack-plugin

Weekly Downloads

82

Version

0.8.1

License

ISC

Unpacked Size

97.9 kB

Total Files

92

Last publish

Collaborators

  • dni