forked from codewars/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsitePlugin.js
More file actions
31 lines (28 loc) · 706 Bytes
/
sitePlugin.js
File metadata and controls
31 lines (28 loc) · 706 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
const path = require("path");
module.exports = () => {
return {
name: "site-plugin",
// Make `@components/` resolve to `src/components`.
configureWebpack: (_config, _isServer) => ({
resolve: {
alias: {
"@components": path.resolve(__dirname, "src/components/"),
},
},
}),
// Append new PostCSS plugins.
configurePostCss: (postcssOptions) => {
postcssOptions.plugins.push(
require("tailwindcss"),
require("postcss-nested"),
require("postcss-preset-env")({
autoprefixer: {
flexbox: "no-2009",
},
stage: 4,
})
);
return postcssOptions;
},
};
};