mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
feat: standalone mode
This commit is contained in:
31
integration/apps/standalone-webpack/webpack.config.js
Normal file
31
integration/apps/standalone-webpack/webpack.config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
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' }),
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user