https://github.com/cyberdex/webpack-typescript-boilerplate
Webpack config for comfortable coding on typescript
https://github.com/cyberdex/webpack-typescript-boilerplate
Last synced: about 1 year ago
JSON representation
Webpack config for comfortable coding on typescript
- Host: GitHub
- URL: https://github.com/cyberdex/webpack-typescript-boilerplate
- Owner: CyberDex
- Created: 2020-04-10T08:20:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T10:41:59.000Z (over 5 years ago)
- Last Synced: 2025-04-21T05:06:14.439Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 227 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webpack typescript boilerplate
## 1. Install:
```
npm i webpack-typescript-boilerplate -D
```
## 2. Copy config file from module:
```
cp node_modules/webpack-typescript-boilerplate/setup/webpack.config.js ./
```
## 3. Change config inside copied file according to these values:
- `entryPoints` - an array of typescript files to bundle separately
- `sourceFolder` - folder for `awesome-typescript-loader` to include
- `assetsFolder` - folder with all additional files (pictures, sounds, configs etc.) witch should be included to release build
- `HTMLTemplate` - main app index.html file template
- `templateParameters` - variables that you will use inside html file like this: `<%= title %>`
- `https` - run DevServer with https (by default it's off)
- `port` - port number for local server (by default it will be 8080)
- `analyze` - add `webpack-bundle-analyzer plugin`
## 4. Put following values to `scripts` block of your package.json
```
"dev": "cross-env NODE_ENV=development webpack-dev-server",
"build": "cross-env NODE_ENV=production webpack"
```
## 5. Use it:
#### Local server (https://localhost:8080)
```
npm run dev
```
#### Production build
```
npm run build
```