Webpack 4, TypeScript, EJS, Babel, SASS, PostCSS
This is my personal Webpack 4 config for single page (index.html) without frameworks
Clone this repository and install modules:
git clone https://github.com/qWici/web-starter.git
cd web-starter
npm install
Run development mode
npm run start
Run build mode
npm run build
- TypeScript
- Babel
- EJS
- CSS/SASS + PostCSS (CSSnano, autoprefixer) + Normilize
- Hashing
- Assets folder for Production
- Minifying JS & CSS
- Two .js chunks - main.js and vendor.js (modules)
Webpack.config.js
{
entry: { main: "./src/index.ts" }, // Entry Point
output: {
path: path.resolve(__dirname, "dist"), // Output folder (Production)
filename: "[name].[chunkhash].js",
pathinfo: false
}
- TSLinter
- Jest
- Basic SCSS (font mixin etc)
- Assets examples (thumbs, manifest, .htaccess)