webpack-esnext-boilerplate

  • Owner: philipwalton/webpack-esnext-boilerplate
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Main metrics

Overview
Name With Ownerphilipwalton/webpack-esnext-boilerplate
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2017-09-09 18:03:02
Pushed At2023-01-03 15:16:19
Last Commit At2019-07-25 14:59:54
Release Count0
用户参与
Stargazers Count517
Watchers Count12
Fork Count38
Commits Count21
Has Issues Enabled
Issues Count9
Issue Open Count2
Pull Requests Count3
Pull Requests Open Count12
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private