Added server build mode for webpack
This commit is contained in:
37
ReallifeGamemode.Client/webpack.config.development.js
Normal file
37
ReallifeGamemode.Client/webpack.config.development.js
Normal file
@@ -0,0 +1,37 @@
|
||||
const path = require('path');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: './index.ts',
|
||||
output: {
|
||||
path: path.resolve(__dirname, '..', '..', 'client_packages'),
|
||||
filename: 'index.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: { loader: 'babel-loader' }
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
allowTsInNodeModules: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin([
|
||||
{ from: 'dlcpacks/', to: '../source_dlcpacks/', force: true },
|
||||
{ from: 'assets/**/*', to: '../client_packages/' }
|
||||
])
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js', '.json']
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user