diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-21 12:06:41 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-21 12:06:41 +0100 |
commit | f0c8cf0e79f003514fd65a70def5820205955a77 (patch) | |
tree | cb66d325fb5d16d8b7fa0f14c91ad17dd4ff7c6c /webpack.config.js | |
parent | 569b2969d530f08e55798c5cb3079948c7c037cd (diff) |
Move to typescript
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/webpack.config.js b/webpack.config.js index 061f0d1..357bfd1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,23 +2,25 @@ const path = require('path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const js = { - entry: './src/client/react/index.js', + entry: './src/client/react/index.tsx', output: { path: path.resolve(__dirname, 'src/client/static'), filename: 'bundle.js', }, + devtool: 'source-map', module: { rules: [ { - test: [/\.js$/, /\.jsx$/], - exclude: [/node_modules/], - loader: 'babel-loader', - options: { presets: ['es2015', 'react', 'stage-2'] }, + test: [/\.tsx?$/], + loader: 'awesome-typescript-loader', }, + // exclude: [/node_modules/], + // loader: 'babel-loader', + // options: { presets: ['es2015', 'react', 'stage-2'] }, ], }, resolve: { - extensions: ['.js', '.jsx'], + extensions: ['.js', '.ts', '.tsx'], }, }; |