All Projects β†’ opchav β†’ React Pwa Webpack Starter

opchav / React Pwa Webpack Starter

Licence: mit
Boilerplate to build a React PWA with Webpack + Workbox

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to React Pwa Webpack Starter

Wordless
All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.
Stars: ✭ 1,374 (+3515.79%)
Mutual labels:  webpack, yarn, sass
Wordpress Starter
πŸ“¦ A starter template for WordPress websites
Stars: ✭ 26 (-31.58%)
Mutual labels:  webpack, yarn, sass
Sass Vars Loader
Use Sass variables defined in Webpack config or in external Javascript or JSON files
Stars: ✭ 112 (+194.74%)
Mutual labels:  webpack, hot-reload, sass
Webxr Webpack Boilerplate
Starter Kit for building rich, immersive WebXR projects (featuring A-Frame) PWA with Webpack and SASS
Stars: ✭ 48 (+26.32%)
Mutual labels:  webpack, sass, pwa
Gulp Scss Starter
Frontend development with pleasure. SCSS version
Stars: ✭ 339 (+792.11%)
Mutual labels:  webpack, yarn, sass
Molecule
βš›οΈ – :atom: – βš›οΈ Boilerplate for cross platform web/native react apps with electron.
Stars: ✭ 95 (+150%)
Mutual labels:  webpack, yarn, hot-reload
Preact Minimal
πŸš€ Minimal preact structure
Stars: ✭ 136 (+257.89%)
Mutual labels:  webpack, yarn, pwa
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (+71.05%)
Mutual labels:  webpack, pwa, workbox
Simple React App
Simple base app using react, react-router v4, hot-reload & sass.
Stars: ✭ 263 (+592.11%)
Mutual labels:  yarn, hot-reload, sass
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+334.21%)
Mutual labels:  webpack, hot-reload, sass
Tris Webpack Boilerplate
A Webpack boilerplate for static websites that has all the necessary modern tools and optimizations built-in. Score a perfect 10/10 on performance.
Stars: ✭ 1,016 (+2573.68%)
Mutual labels:  webpack, sass, pwa
Angular Electron
Ultra-fast bootstrapping with Angular and Electron (Typescript + SASS + Hot Reload) 🚀
Stars: ✭ 4,914 (+12831.58%)
Mutual labels:  webpack, hot-reload, sass
Monitaure
πŸ”” A server uptime monitoring progressive web application - NO LONGER MAINTAINED
Stars: ✭ 135 (+255.26%)
Mutual labels:  webpack, sass, pwa
Reactql
Universal React+GraphQL starter kit: React 16, Apollo 2, MobX, Emotion, Webpack 4, GraphQL Code Generator, React Router 4, PostCSS, SSR
Stars: ✭ 1,833 (+4723.68%)
Mutual labels:  webpack, hot-reload, sass
Webpack Pwa Manifest
Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
Stars: ✭ 447 (+1076.32%)
Mutual labels:  webpack, hot-reload, pwa
Slinky
A light-weight, responsive, mobile-like navigation menu plugin
Stars: ✭ 649 (+1607.89%)
Mutual labels:  webpack, yarn, sass
Webpack2 Express Heroku Starter
Starter app using Webpack 2, Express, setup to deploy to Heroku.
Stars: ✭ 12 (-68.42%)
Mutual labels:  webpack, sass
Front End Stack
Starter kit for building single-page app using React, Redux, RxJS, Reselect, Material UI, Immer, Prettier and Webpack.
Stars: ✭ 11 (-71.05%)
Mutual labels:  webpack, yarn
Thinkful Workshop React Redux Node Mongodb Webpack2
Stars: ✭ 12 (-68.42%)
Mutual labels:  webpack, pwa
Mailgo
πŸ’Œ mailgo, a new concept of mailto and tel links
Stars: ✭ 978 (+2473.68%)
Mutual labels:  webpack, yarn

Boilerplate to build a React PWA with Webpack + Workbox

I have build this boilerplate following the Webpack documentation which is great.

Why another boilerplate?

The answer is simple. I wanted to go through the whole process of setting up my environment to build awesome web apps and be able to understand every single piece of a boilerplate config. That's why I decided to build my own. I'm very thankful to the new Webpack documentation which has helped me a lot.

This starter kit comes with:

  • Yarn: A fast dependency manager
  • Webpack 3 setup for production and development environments
  • Workbox: JavaScript Libraries for Progressive Web Apps
  • Prettier: Opinionated Code Formatter
  • Live reload with webpack-dev-server
  • Babel 7 to compile next generation JavaScript
  • SASS
  • HTML Webpack Plugin: Especially useful for webpack bundles that include a hash in the filename which changes every compilation. With this plugin you write a HTML template and the plugin takes care of inserting the .js and .css script for you whenever your code changes and gets compiled.
  • css-loader and style-loader to loader your css and put into your .js bundle when in dev mode or load the css and put it in a separate folder when in production mode with extract-text-webpack-plugin
  • url-loader used to load your images into your bundle. This plugin can return a Data Url if the file is smaller than a byte limit. That means if you have an image file which is less than a size lime you have specified on your webpack config that assets gets bundled inline, otherwise it is copied to to your dist folder with file-loader. Hence, when you add url-loader to your devDependencies you also have to add file-loader cuz it's a peer dependencie.

Getting Started

To get started, clone the repo and run yarn install, or npm install if you are using npm. I recommend Yarn because it's fast than npm and also enables you to have a cache on your machine so you don't waste your bandwidth having to download everything whenever your run npm install.

Get the latest snapshot, or the entire repo if you remove --depth=1

git clone --depth=1 https://github.com/oPauloChaves/es6-webpack2-starter.git project-name
cd project-name
yarn install
# or
npm install

You have to have Node (version >= 6) installed on your machine. This project depends on webpack-dev-server which recommends you use version 6 for the moment because there are some known issues with version 7. In my machine I have been using node v7 with no issues.

Running in development mode

yarn start
# or
npm start 

The app is available on localhost:3000

Building and running the production build

yarn run build

npm i -g serve
serve -s dist

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚                                                β”‚
   β”‚   Serving!                                     β”‚
   β”‚                                                β”‚
   β”‚   - Local:            http://localhost:5000    β”‚
   β”‚   - On Your Network:  http://10.0.0.105:5000   β”‚
   β”‚                                                β”‚
   β”‚   Copied local address to clipboard!           β”‚
   β”‚                                                β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Testing

Linting

yarn run lint
# or to autofix
yarn run lint:fix

Formatting with Prettier

yarn run format

Contributing

Pull requests are very welcome!

TOD0

Very Helpful resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].