-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcraco.config.js
More file actions
37 lines (35 loc) · 924 Bytes
/
craco.config.js
File metadata and controls
37 lines (35 loc) · 924 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
33
34
35
36
37
/* eslint-disable */
const path = require("path");
const StyleLintPlugin = require("stylelint-webpack-plugin");
// const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
module.exports = {
style: {
// https://github.com/gsoft-inc/craco/blob/master/recipes/set-css-loader-locals-convention/craco.config.js
css: {
loaderOptions: {
localsConvention: "camelCase",
},
},
},
webpack: {
alias: {
"@": path.resolve(__dirname, "src/"),
},
plugins: [
// https://github.com/gsoft-inc/craco/blob/master/recipes/add-stylelint/craco.config.js
new StyleLintPlugin({
configBasedir: __dirname,
context: path.resolve(__dirname, "src"),
files: ["**/*.scss"],
}),
// new BundleAnalyzerPlugin(),
],
},
jest: {
configure: {
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
},
},
};