3.2.1 • Published 4 years ago

@blunck/webpack-scripts v3.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

webpack-scripts

Latest Version on NPM

Opinionated webpack scripts

Installation

npm install --save-dev @blunck/webpack-scripts

Add scripts to you package.json

{
    "scripts": {
        "start": "webpack-scripts start",
        "build": "webpack-scripts build",
        "profile": "webpack-scripts profile"
    }
}

Requirements

The webpack configuration expects the root of your project to contain a src directory with an index.js & index.html file:

src
  index.js
  index.html
package.json
.webpackrc

Configuration

Add a .webpackrc file to the root of your project. Following options are default:

{
    "framework": "vanilla",
    "host": "localhost",
    "port": 3000,
    "browser": "google chrome",
    "copy": null,
    "cssSourceMap": false,
    "alias": null,
    "zip": false,
    "bugsnagApiKey": null,
    "outputPath": "dist",
    "publicPath": "/",
    "sourceMaps": true,
    "gzip": true
}
  • framework Javascript framework that is used: "vanilla", "react" or "ng1"
  • port Port to start development server at
  • browser Browser to open development server in
  • copy Array of patterns to copy to outputPath. See Copy Webpack Plugin for more info

  • cssSourceMap Enable css / scss source maps (Causes style flash on initial load when running development server)

  • alias Create aliases to import or require certain modules more easily. See Webpack Documentation for more info
  • zip If true create zip archive with build artifacts with following name: PROJECT_NAME-GIT_COMMIT_HASH.zip
  • bugsnagApiKey If set upload source maps to bugsnag
  • outputPath The output directory relative to th .webpackrc file
  • publicPath Public URL of the output directory when referenced in a browser
  • sourceMaps Set to false to disable generation of js & css source maps
  • gzip Set to false to prevent js / css files from being gzipped

Scripts

Build

Build a production version of your application

npm run build

Start

Start a development server & re-compile / reload on changes. (HMR support for react)

npm run start

Profile

Build a production version of your application & open a page with information about your bundle.

npm run profile
3.2.1

4 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.13.0

6 years ago

1.12.1

6 years ago

1.12.0

6 years ago

1.11.0

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-alpha.3

6 years ago

1.0.0-alpha.2

6 years ago

1.0.0-alpha.1

6 years ago

1.0.0-alpha.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago