mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
module.exports = {
|
|
target: 'web',
|
|
mode: 'development',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist')
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
'css-loader'
|
|
]
|
|
},
|
|
{
|
|
test: /\.ts$/,
|
|
use: {
|
|
loader: require.resolve('babel-loader'),
|
|
options: {
|
|
presets: [
|
|
'@babel/preset-typescript'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new MiniCssExtractPlugin(),
|
|
new HtmlWebpackPlugin({
|
|
template: path.resolve(__dirname, 'index.html')
|
|
})
|
|
],
|
|
entry: {
|
|
main: path.resolve(__dirname, 'src/main.ts')
|
|
}
|
|
};
|