Merge pull request #127 from thecodingmachine/remove_dead_code
[libreadventure.git] / front / webpack.config.js
1 const path = require('path');
2 const webpack = require('webpack');
3
4 module.exports = {
5 entry: './src/index.ts',
6 devtool: 'inline-source-map',
7 devServer: {
8 contentBase: './dist',
9 host: '0.0.0.0',
10 disableHostCheck: true,
11 historyApiFallback: {
12 rewrites: [
13 { from: /^_\/.*$/, to: '/index.html' }
14 ],
15 disableDotRule: true
16 },
17 },
18 module: {
19 rules: [
20 {
21 test: /\.tsx?$/,
22 use: 'ts-loader',
23 exclude: /node_modules/,
24 },
25 ],
26 },
27 resolve: {
28 extensions: [ '.tsx', '.ts', '.js' ],
29 },
30 output: {
31 filename: 'bundle.js',
32 path: path.resolve(__dirname, 'dist'),
33 publicPath: '/'
34 },
35 plugins: [
36 new webpack.ProvidePlugin({
37 Phaser: 'phaser'
38 }),
39 new webpack.EnvironmentPlugin(['API_URL', 'DEBUG_MODE'])
40 ]
41 };