1diff --git a/generator/src/codegen.js b/generator/src/codegen.js
2index baf5368..e5edf4d 100644
3--- a/generator/src/codegen.js
4+++ b/generator/src/codegen.js
5@@ -37,9 +37,9 @@ export async function generate(basePath) {
6 copyToBoth("SiteConfig.elm"),
7
8 fs.promises.writeFile("./.elm-pages/Pages.elm", uiFileContent),
9- fs.promises.copyFile(
10- path.join(__dirname, `./elm-application.json`),
11- `./elm-stuff/elm-pages/elm-application.json`
12+ fs.promises.writeFile(
13+ `./elm-stuff/elm-pages/elm-application.json`,
14+ fs.readFileSync(path.join(__dirname, `./elm-application.json`))
15 ),
16 // write `Pages.elm` with cli interface
17 fs.promises.writeFile(
18@@ -82,9 +82,9 @@ function writeFetcherModules(basePath, fetcherData) {
19 }
20
21 async function newCopyBoth(modulePath) {
22- await fs.promises.copyFile(
23- path.join(__dirname, modulePath),
24- path.join(`./elm-stuff/elm-pages/client/.elm-pages/`, modulePath)
25+ await fs.promises.writeFile(
26+ path.join(`./elm-stuff/elm-pages/client/.elm-pages/`, modulePath),
27+ fs.readFileSync(path.join(__dirname, modulePath))
28 );
29 }
30
31@@ -197,7 +197,7 @@ async function copyFileEnsureDir(from, to) {
32 await fs.promises.mkdir(path.dirname(to), {
33 recursive: true,
34 });
35- await fs.promises.copyFile(from, to);
36+ await fs.promises.writeFile(to, fs.readFileSync(from));
37 }
38
39 /**