• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Webpack 5 Boilerplate for JS/React/TS apps.

Webpack 5 Max (JS/React/TS)

License: MIT

logo

Webpack 5 Boilerplate for JS/React/TS apps.

🔗 Demo on CodeSandbox


Includes

  • 5 config files with all possible settings
    • common
    • common + development
    • common + production
    • common + production + pwa
    • common + production + analyze
  • React Todo App example
    • actions: add, complete, remove, edit, update
    • filters: all, active, completed
    • controls: mark all todos as completed, clear all completed todos
    • state management: useContext/useReducer
    • styling - react-bootstrap
    • type checking - prop-types
  • HTML template with all meta & link tags for SEO
    • don't forget to change values in HtmlWebpackPlugin templateParameters object
  • browserconfig.xml, robots.txt, sitemap.xml
  • service-worker & manifest.json
    • don't forget to change values in manifest.json
  • netlify.toml with all security headers

You can easily add settings for Vue or Angular components.

Vue

  • install deps
yarn add -D vue-loader vue-template-compiler
# or
npm i -D yarn vue-loader vue-template-compiler
  • add following to config/webpack/common.js
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader'
      }
    ]
  },
  plugins: [
    new VueLoaderPlugin()
  ]
}

Angular

  • install dep
yarn add -D angular2-template-loader
# or
npm i -D angular2-template-loader
  • change following in config/webpack/common.js
{
  test: /.tsx?$/i,
  exclude: /node_modules/,
  use: [babelLoader, 'ts-loader', 'angular2-template-loader?keepUrl=true']
},

Installation

# clone repo
git clone https://github.com/harryheman/Webpack5-Max.git

# install deps
yarn
# or
npm i

Usage

Development Server

yarn start
# or
npm start

Production Bundle

yarn build
# or
npm run build

Production Bundle PWA

yarn pwa
# or
npm run pwa

Production Bundle Analyzer

yarn analyze
# or
npm run analyze

Author

Igor Agapov


License

This project is open source and available under the MIT License

More Repositories

1

React-Total

Ресурс для изучения React.js и связанных с ним технологий на русском языке
JavaScript
1,999
star
2

modern-html-starter-template

Modern HTML Starter Template
HTML
838
star
3

my-js

Руководства, шпаргалки, вопросы и другие материалы по JavaScript, TypeScript, React, Next.js, Node.js, Express, Prisma, GraphQL, Docker и другим технологиям, связанным с разработкой веб-приложений.
JavaScript
483
star
4

blog-posts

Code from my articles and tutorials
JavaScript
145
star
5

simple-fetch

Fetch API Wrapper
JavaScript
26
star
6

React-Apollo-GraphQL-Social-App

React Apollo GraphQL Social App
JavaScript
22
star
7

React-Socket.io-Chat-App

React Socket.io Chat App
JavaScript
14
star
8

Shared-Code

JavaScript
9
star
9

utils

Useful JavaScript Utilities.
TypeScript
6
star
10

algorithms-data-structures

Структуры данных и алгоритмы, реализованные на JavaScript.
JavaScript
6
star
11

typescript-handbook

TypeScript Handbook
JavaScript
4
star
12

docker-test

JavaScript
3
star
13

chat-app

JavaScript
2
star
14

shorelark

Симуляция эволюции с помощью нейронной сети, генетического алгоритма и высшей математики
Rust
2
star
15

react-webrtc

JavaScript
2
star
16

react-nest-ts

TypeScript
1
star
17

ts-wasm-compiler

TypeScript -> WebAssembly Compiler
TypeScript
1
star
18

javascript-questions-expo

JavaScript Questions Mobile App (React Native)
TypeScript
1
star
19

secure-app

Security HTTP Headers
JavaScript
1
star
20

self-host-nextjs

Shell
1
star