mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
41 lines
846 B
JavaScript
41 lines
846 B
JavaScript
![]() |
const path = require('path');
|
||
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||
|
|
||
|
module.exports = {
|
||
|
mode: 'production',
|
||
|
entry: {
|
||
|
app: path.join(__dirname, 'index.tsx'),
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: ['.ts', '.js', '.tsx', '.jsx']
|
||
|
},
|
||
|
output: {
|
||
|
globalObject: 'self',
|
||
|
filename: '[name].bundle.js',
|
||
|
path: path.resolve(__dirname, '../../../../lib/cli/traceViewer/web')
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.(j|t)sx?$/,
|
||
|
use: 'ts-loader',
|
||
|
exclude: /node_modules/
|
||
|
},
|
||
|
{
|
||
|
test: /\.css$/,
|
||
|
use: ['style-loader', 'css-loader']
|
||
|
},
|
||
|
{
|
||
|
test: /\.ttf$/,
|
||
|
use: ['file-loader']
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
plugins: [
|
||
|
new HtmlWebPackPlugin({
|
||
|
title: 'Playwright Trace Viewer',
|
||
|
template: path.join(__dirname, 'index.html'),
|
||
|
})
|
||
|
]
|
||
|
};
|