1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-02-21 07:33:07 +08:00
cfx-server-data/resources/[gameplay]/chat/webpack.config.js
2020-04-12 15:16:02 +02:00

45 lines
1.2 KiB
JavaScript

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
mode: 'production',
entry: './html/main.ts',
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
appendTsSuffixTo: [/\.vue$/],
}
},
{
test: /\.vue$/,
loader: 'vue-loader'
},
]
},
plugins: [
new VueLoaderPlugin(),
new HtmlWebpackPlugin({
inlineSource: '.(js|css)$',
template: './html/index.html',
filename: 'ui.html'
}),
new HtmlWebpackInlineSourcePlugin(),
new CopyPlugin([
{ from: 'html/index.css', to: 'index.css' }
]),
],
resolve: {
extensions: [ '.ts', '.js' ]
},
output: {
filename: 'chat.js',
path: __dirname + '/dist/'
},
//devtool: 'inline-source-map'
};