-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.js
More file actions
27 lines (25 loc) · 917 Bytes
/
webpack.config.js
File metadata and controls
27 lines (25 loc) · 917 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
26
27
// eslint-disable-next-line @typescript-eslint/no-require-imports
const webpack = require('vortex-api/bin/webpack').default;
// eslint-disable-next-line @typescript-eslint/no-require-imports
const CopyPlugin = require('copy-webpack-plugin');
const config = webpack('game-mount-and-blade2', __dirname, 5);
config.plugins.push(
new CopyPlugin({
patterns: [
{ from: '**/Bannerlord.LauncherManager.Native.dll', to: '[name][ext]' },
{ from: 'assets/*.jpg', to: '[name][ext]' },
{ from: 'assets/*.png', to: '[name][ext]' },
{ from: 'assets/*.svg', to: '[name][ext]' },
{ from: 'src/stylesheets/*.scss', to: '[name][ext]' },
{ from: 'assets/localization/**/*.xml', to: 'localization_[contenthash][ext]' },
],
})
);
config.module.rules.push({
test: /\.node$/,
loader: 'native-addon-loader',
options: {
name: '[contenthash].[ext]',
},
});
module.exports = config;