workadventure/front/webpack.config.js
David Négrier 6f2c319785 Merge branch 'master' of github.com:thecodingmachine/workadventure into scaling
# Conflicts:
#	back/src/Services/SocketManager.ts
#	deeployer.libsonnet
#	docker-compose.yaml
#	front/src/Connexion/RoomConnection.ts
#	front/src/Enum/EnvironmentVariable.ts
#	front/src/Phaser/Game/GameScene.ts
#	front/webpack.config.js
#	pusher/src/Controller/IoSocketController.ts
2020-12-11 13:00:11 +01:00

52 lines
1.3 KiB
JavaScript

const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.ts',
devtool: 'inline-source-map',
devServer: {
contentBase: './dist',
host: '0.0.0.0',
disableHostCheck: true,
historyApiFallback: {
rewrites: [
{ from: /^_\/.*$/, to: '/index.html' }
],
disableDotRule: true
},
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ],
},
output: {
filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
externals:[
require('webpack-require-http')
],
plugins: [
new HtmlWebpackPlugin(
{
template: './dist/index.html'
}
),
new webpack.ProvidePlugin({
Phaser: 'phaser'
}),
new webpack.EnvironmentPlugin(['API_URL', 'UPLOADER_URL', 'ADMIN_URL', 'DEBUG_MODE', 'TURN_SERVER', 'TURN_USER', 'TURN_PASSWORD', 'JITSI_URL', 'JITSI_PRIVATE_MODE'])
],
};