Scripts/resources/[cfx-default]/[local]/screenshot-basic/ui.config.js

30 lines
725 B
JavaScript
Raw Normal View History

2024-12-29 19:48:41 +00:00
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
module.exports = {
entry: './ui/src/main.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
plugins: [
new HtmlWebpackPlugin({
inlineSource: '.(js|css)$',
template: './ui/index.html',
filename: 'ui.html'
}),
new HtmlWebpackInlineSourcePlugin()
],
resolve: {
extensions: [ '.ts', '.js' ]
},
output: {
filename: 'ui.js',
path: __dirname + '/dist/'
},
};