-
-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathwebpack.renderer.config.ts
More file actions
32 lines (28 loc) · 801 Bytes
/
webpack.renderer.config.ts
File metadata and controls
32 lines (28 loc) · 801 Bytes
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
28
29
30
31
32
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
// SPDX-License-Identifier: CC0-1.0
import type { Configuration } from 'webpack';
import { rules } from './webpack.rules';
import { plugins } from './webpack.plugins';
import { ignores } from './webpack.ignores';
// The settings renderer uses CSS modules, so we have to enable them here.
rules.push({
test: /\.s[ac]ss$/i,
use: [
{ loader: 'style-loader' },
{
loader: 'css-loader',
options: { modules: { auto: true, localIdentName: '[local]-[hash:base64:8]' } },
},
{ loader: 'sass-loader' },
],
});
export const rendererConfig: Configuration = {
module: {
rules,
},
plugins,
externals: ignores,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.scss'],
},
};