Dabolus / pwa-webpack-starter-kit

PWA Starter Kit with Webpack
MIT License
12 stars 5 forks source link
gulp lit-element lit-html prpl starter-kit webcomponents webpack

PWA Starter Kit with Webpack

Build Status Dependencies Status Dev Dependencies Status Maintainability

Differences with the original PWA Starter Kit

Setup

Adding more build targets

To configure Babel and PostCSS you have to specify a list of browsers that your app will support by being transpiled and polyfilled (via the browserslist library), while PRPL Server works by passing it a set of browser capabilities (via the browser-capabilities library). This means that to add new build targets you will have to check out what browsers support your target capabilities. To do so, you might find useful this compatibility table.

After finding out the correct browserslist configuration, adding a new build target is quite simple; you just need to tweak your Gulp configuration a bit. Here are the steps you should follow:

  1. Open the main gulp config file (gulp/config.ts)
  2. Copy-paste one of the build:xx tasks and replace its parameters respectively with your new build name, the browserslist the new build will be built for and their capabilities
  3. Add your new build:xx task to the main build task, together with the other builds that are run in parallel
  4. Done!

Contributing

PRs are welcome! You noticed a bug, a possible improvement or whatever? Any help is always appreciated, so don't hesitate opening one!

Be sure to check out the contributing guidelines to fasten up the merging process.