chore(release): 0.1.1
[risinglegends.git] / webpack.config.js
1 //webpack.config.js
2 const path = require('path');
3 const tsconfigPaths = require('tsconfig-paths-webpack-plugin');
4
5 const env = process.env.ENVIRONMENT || 'production';
6
7 module.exports = {
8   mode: env,
9   devtool: env === 'development' ? "inline-source-map" : false,
10   entry: {
11     main: "./src/client/index.ts",
12   },
13   module: {
14     rules: [
15       {
16         test: /\.tsx?$/,
17         loader: "ts-loader"
18       }
19     ]
20   },
21   externals: {
22     "jquery": "$"
23   },
24   output: {
25     path: path.resolve(__dirname, './public', 'assets'),
26     filename: "bundle.js" // <--- Will be compiled to this single file
27   },
28   resolve: {
29     extensions: [".ts", ".tsx", ".js"],
30     plugins: [
31       new tsconfigPaths()
32     ]
33   },
34   output: {
35     filename: "bundle.js",
36     path: path.resolve(__dirname, './public', 'assets')
37   },
38   performance: {
39     maxEntrypointSize: 512000,
40     maxAssetSize: 512000
41   },  
42 };