hydra/webpack.renderer.config.ts
2024-04-18 08:46:06 +01:00

29 lines
704 B
TypeScript

import type { Configuration } from "webpack";
import { VanillaExtractPlugin } from "@vanilla-extract/webpack-plugin";
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
import { rules } from "./webpack.rules";
import { plugins } from "./webpack.plugins";
rules.push({
test: /\.css$/,
use: [{ loader: "style-loader" }, { loader: "css-loader" }],
});
rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
export const rendererConfig: Configuration = {
module: {
rules,
},
devtool: "source-map",
plugins: [...plugins, new VanillaExtractPlugin()],
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".css"],
plugins: [new TsconfigPathsPlugin()],
},
};