mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 23:54:05 -08:00
54dfee02b2
* move codemirror-promql as a prometheus web module Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * remove unecessary file for the codemirror module Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * change license for Apache Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * fix codemirror build Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const path = require('path');
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: path.join(__dirname, '/src/app/app.ts'),
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
devtool: 'inline-source-map',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
loader: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
|
|
new HtmlWebpackPlugin({
|
|
hash: true,
|
|
filename: 'index.html', //relative to root of the application
|
|
path: path.resolve(__dirname, 'dist'),
|
|
template: './src/app/app.html',
|
|
}),
|
|
],
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
devServer: {
|
|
contentBase: './dist',
|
|
},
|
|
};
|