summaryrefslogtreecommitdiff
path: root/static/webpack.config.js
blob: 6204e463b7ea975a3227e31b1bedf03e60acf705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const path = require("path")

module.exports = {
	module: {
		rules: [
			{
				test: /\.css$/i,
				use: [
					"style-loader",
					"css-loader",
					{
						loader: "postcss-loader",
						options: { postcssOptions: { plugins: [ require("@tailwindcss/postcss") ] } },
					},
				],
			},
			{
				test: /\.svg$/,
				loader: "svg-sprite-loader",
				options: {
					symbolId: filePath => "sprite-" + path.basename(filePath).replace(/_[0-9]+dp_.*/, ""),
				},
			},
		],
	},
	mode: "development",
}