Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Commit 78916c0

Browse files
committed
2 parents e2820b7 + 759f772 commit 78916c0

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# Retain
22
> hello
3+
4+
### Usage
5+
- Clone or fork this repository
6+
- Make sure you have [node.js](https://nodejs.org/) installed version 5+
7+
- Make sure you have NPM installed version 3+
8+
- run `npm install -g webpack webpack-dev-server typescript ts-node tslint`
9+
- run `npm install`
10+
- run `npm start` to fire up dev server
11+
- open browser to [`http://localhost:3000`](http://localhost:3000)

webpack.config.js

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
var path = require('path');
2+
const webpack = require('webpack');
3+
4+
const config = {
5+
cache: false,
6+
devtool: 'source-map',
7+
entry: {
8+
polyfills: './src/polyfills',
9+
vendor: './src/vendor',
10+
main: './src/main'
11+
},
12+
13+
output: {
14+
path: path.join(__dirname, 'dist'),
15+
filename: '[name].bundle.js',
16+
sourceMapFilename: '[name].map',
17+
chunkFilename: '[id].chunk.js'
18+
},
19+
module: {
20+
loaders: [
21+
{ test: /\.ts$/, loader: 'awesome-typescript-loader' },
22+
{ test: /\.json$/, loader: 'json-loader' },
23+
{ test: /\.html/, loader: 'raw-loader' },
24+
{ test: /\.css$/, loader: 'to-string-loader!css-loader' },
25+
]
26+
},
27+
28+
plugins: [
29+
new webpack.optimize.CommonsChunkPlugin({ name: ['polyfills', 'vendor', 'main'].reverse(), minChunks: Infinity }),
30+
],
31+
32+
resolve: {
33+
extensions: ['', '.ts', '.js', '.json'],
34+
modulesDirectories: ['node_modules']
35+
},
36+
37+
devServer: {
38+
historyApiFallback: true,
39+
watchOptions: { aggregateTimeout: 300, poll: 1000 }
40+
},
41+
42+
node: {
43+
global: true,
44+
process: true,
45+
Buffer: false,
46+
crypto: 'empty',
47+
module: false,
48+
clearImmediate: false,
49+
setImmediate: false,
50+
clearTimeout: true,
51+
setTimeout: true
52+
}
53+
};
54+
module.exports = config;

0 commit comments

Comments
 (0)