-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.js
More file actions
25 lines (23 loc) · 813 Bytes
/
webpack.config.js
File metadata and controls
25 lines (23 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.js',]
},
entry: {
'client_packages': './client_packages',
},
output: {
path: path.resolve(__dirname),
filename: '[name]/index.js'
},
target: 'node', // in order to ignore built-in modules like path, fs, etc.
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
plugins: [
new CopyWebpackPlugin([
{ from: './client_packages/gamemode/browser/js', to: 'client_packages/RP/Browsers' },
{ from: './client_packages/gamemode/scripts', to: 'client_packages/_rage-console' }
])
]
};