@medly/webpack-config
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

Webpack Config

What is webpack?

At its core, webpack is a static module bundler for modern JavaScript applications. When webpack processes your application, it internally builds a dependency graph which maps every module your project needs and generates one or more bundles.

About

Recommended webpack configuration to bundle the assets in your projects.

Shared webpack config

Install

yarn add -D @medly/webpack-config

Usage

1. Use default settings

Add below code in your package.json

{
 "script": {
  "watch": "webpack serve --open --mode development --config node_modules/@medly/webpack-config",
  "dist": "webpack --mode production --config node_modules/@medly/webpack-config",
  "dist:analyze": "npm run dist -- --analyze"
 }
}

2. Overwrite default settings

Add webpack.dev.js file at root level with below code

const { configure } = require('@medly/webpack-config');

module.exports = configure({
 devServer: {
  port: 8090
 }
});

Add below code in your package.json

{
 "script": {
  "watch": "webpack serve --mode development --config webpack.dev.js"
 }
}

Default config

To view the default config click here

Readme

Keywords

Package Sidebar

Install

npm i @medly/webpack-config

Weekly Downloads

14

Version

0.6.0

License

MIT

Unpacked Size

13.3 kB

Total Files

8

Last publish

Collaborators

  • kdabir
  • gmukul01