mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
32 lines
664 B
JavaScript
32 lines
664 B
JavaScript
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import HtmlWebpackPlugin from 'html-webpack-plugin'
|
|
|
|
const root = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default {
|
|
entry: './src/main.ts',
|
|
output: {
|
|
path: path.join(root, 'dist'),
|
|
filename: 'assets/app.[contenthash].js',
|
|
assetModuleFilename: 'assets/[name].[contenthash][ext]',
|
|
clean: true,
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.js'],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
exclude: /node_modules/,
|
|
use: 'ts-loader',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({ template: './index.html' }),
|
|
],
|
|
}
|