-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgatsby-node.js
More file actions
30 lines (28 loc) · 852 Bytes
/
gatsby-node.js
File metadata and controls
30 lines (28 loc) · 852 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
const path = require("path");
// https://www.gatsbyjs.org/docs/node-apis/#onCreateWebpackConfig
exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
actions.setWebpackConfig({
resolve: {
alias: {
"@components": path.resolve(__dirname, "src/components"),
"@images": path.resolve(__dirname, "src/images"),
"@pages": path.resolve(__dirname, "src/pages"),
"@styles": path.resolve(__dirname, "src/styles"),
"@views": path.resolve(__dirname, "src/views"),
"@hooks": path.resolve(__dirname, "src/hooks"),
},
},
});
if (stage === "build-html" || stage === "develop-html") {
actions.setWebpackConfig({
module: {
rules: [
{
test: /locomotive-scroll/,
use: loaders.null(),
},
],
},
});
}
};