forked from happeo/happeouikit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-node.js
29 lines (28 loc) · 855 Bytes
/
gatsby-node.js
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
/**
* The app is built using server side rendering, so any packages depending on 'window' object, will throw an error. To
* fix it, a dummy loader is used for those packages during SSR. Any packages that depend on window object should be added
* to the test prop of the null loader.
*/
exports.onCreateWebpackConfig = ({ stage, loaders, actions, plugins }) => {
if (stage === "develop-html" || stage === "build-html") {
actions.setWebpackConfig({
module: {
rules: [
{
test: /universe|croppie|tribute|codemirror/,
use: loaders.null()
}
]
}
});
}
// Remove 'speedy mode' CSS injection when deploying documentation
// to allow editing styles
actions.setWebpackConfig({
plugins: [
plugins.define({
SC_DISABLE_SPEEDY: true
})
]
});
};