2020-04-03 14:56:21 +02:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.ts',
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
devServer: {
|
|
|
|
contentBase: './dist',
|
2020-04-03 18:31:11 +02:00
|
|
|
host: '0.0.0.0',
|
|
|
|
disableHostCheck: true,
|
2020-04-03 14:56:21 +02:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: [ '.tsx', '.ts', '.js' ],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
Phaser: 'phaser'
|
2020-04-03 18:31:11 +02:00
|
|
|
}),
|
2020-04-13 19:40:10 +02:00
|
|
|
new webpack.EnvironmentPlugin(['API_URL', 'DEBUG_MODE'])
|
2020-04-03 14:56:21 +02:00
|
|
|
]
|
|
|
|
};
|