GitXplorerGitXplorer
p

webpack-esnext-boilerplate

public
516 stars
41 forks
14 issues

Commits

List of commits on branch master.
Unverified
c919fc852cb2ee17a945a5d88811e4e7cf33312d

Upgrade dependencies

pphilipwalton committed 5 years ago
Unverified
3ac8576f4a11899787dcf8f5510e2c86620b3fd1

Update to babel 7

pphilipwalton committed 6 years ago
Verified
b57f0ec12d11df19d32b2a5d826f94d964755212

Merge pull request #8 from jakub-g/terser-esnext

pphilipwalton committed 6 years ago
Unverified
429937fae431cde6afbad059bfa62e8c1de5fa96

Disable props mangling in terser config

jjakub-g committed 6 years ago
Unverified
1233be634b4f119b60f298c46275e2aeaa9368ad

Let terser minify .mjs files (fix #5)

jjakub-g committed 6 years ago
Unverified
2303c3d3f2fd905441e2cc51502e388c75437043

Don't let terser mangle props on window (fix #7)

jjakub-g committed 6 years ago

README

The README file for this repository.

Webpack ESNext Boilerplate

Webpack configuration and build scripts to deploy ES2015+ code to production (via <script type="module">) with legacy browser fallback support via <script nomodule>.

This boilerplate is an implementation of the techniques described in my article: Deploying ES2015+ Code in Production Today.

Usage

To view site locally, run the following command:

npm start

This will build all the source files, watch for changes, and serve them from http://localhost:8080. Make sure you open up the developer tools to view the console output.

To build the source files without watching for changes or starting a local server, run:

npm run build

development vs production environments

By default the build output is unminified. To generate minified, production-ready files, set NODE_ENV to production.

NODE_ENV=production npm run build

Features

To validate that this technique works for more than just simple, single-bundle sites, this boilerplate implements several advanced webpack features:

To see how these feature manifest themselves in the generated files, view the public directory after running the build step.