32 lines
657 B
JavaScript
32 lines
657 B
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
entry: './src/index.ts',
|
|
devtool: 'inline-source-map',
|
|
devServer: {
|
|
contentBase: './dist',
|
|
},
|
|
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'
|
|
})
|
|
]
|
|
};
|