forked from SOZ-Faut-etre-Sub/SOZ-FiveM-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
53 lines (52 loc) · 1.49 KB
/
webpack.config.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
----------------------- [ MenuV ] -----------------------
-- GitHub: https://github.com/ThymonA/menuv/
-- License: GNU General Public License v3.0
-- https://choosealicense.com/licenses/gpl-3.0/
-- Author: Thymon Arens <[email protected]>
-- Name: MenuV
-- Version: 1.0.0
-- Description: FiveM menu library for creating menu's
----------------------- [ MenuV ] -----------------------
*/
const HTML_WEBPACK_PLUGIN = require('html-webpack-plugin');
const VUE_LOADER_PLUGIN = require('vue-loader/lib/plugin');
const COPY_PLUGIN = require('copy-webpack-plugin');
module.exports = {
mode: 'production',
entry: './source/app/load.ts',
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: { appendTsSuffixTo: [/\.vue$/] }
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
new VUE_LOADER_PLUGIN(),
new HTML_WEBPACK_PLUGIN({
inlineSource: '.(js|css)$',
template: './source/app/html/menuv.html',
filename: 'menuv.html'
}),
new COPY_PLUGIN({
patterns: [
{ from: 'source/app/html/assets/', to: 'assets/' },
],
})
],
resolve: {
extensions: [ '.ts', '.js' ]
},
output: {
filename: './assets/js/menuv.js',
path: __dirname + '/dist/'
}
};