Skip to content

Commit 5d11526

Browse files
committed
Fix copying "dev-404-page.js" to the cache folder on Windows
Fixes #2819
1 parent c332a76 commit 5d11526

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/gatsby/src/bootstrap/load-plugins.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ module.exports = async (config = {}) => {
133133
}
134134

135135
// Add internal plugins
136+
plugins.push(
137+
processPlugin(path.join(__dirname, `../internal-plugins/dev-404-page`))
138+
)
136139
plugins.push(
137140
processPlugin(
138141
path.join(__dirname, `../internal-plugins/component-page-creator`)
@@ -148,9 +151,6 @@ module.exports = async (config = {}) => {
148151
path.join(__dirname, `../internal-plugins/internal-data-bridge`)
149152
)
150153
)
151-
plugins.push(
152-
processPlugin(path.join(__dirname, `../internal-plugins/dev-404-page`))
153-
)
154154
plugins.push(
155155
processPlugin(path.join(__dirname, `../internal-plugins/prod-404`))
156156
)

packages/gatsby/src/internal-plugins/dev-404-page/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.createPages = async ({ store, boundActionCreators }) => {
88
const currentPath = path.join(__dirname, `./raw_dev-404-page.js`)
99
const newPath = path.join(program.directory, `.cache`, `dev-404-page.js`)
1010

11-
fs.copySync(currentPath, newPath)
11+
await fs.copy(currentPath, newPath)
1212

1313
createPage({
1414
component: newPath,

0 commit comments

Comments
 (0)