File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable import/no-extraneous-dependencies */
2
- import { join } from "path" ;
2
+ import { resolve , join } from "path" ;
3
3
4
4
/* covered by nuxt */
5
- import { move } from "fs-extra" ;
5
+ import { copy } from "fs-extra" ;
6
6
import _ from "lodash" ;
7
7
import { r , urlJoin } from "@nuxt/common" ;
8
8
import chokidar from "chokidar" ;
@@ -195,10 +195,13 @@ export default function NetlifyCmsModule(moduleOptions) {
195
195
}
196
196
197
197
// Move cms folder from `dist/_nuxt` folder to `dist/` after nuxt generate
198
- this . nuxt . hook ( "generate:distCopied" , async generator => {
199
- await move (
200
- join ( generator . distNuxtPath , config . adminPath ) . replace ( / \/ $ / , "" ) ,
201
- join ( generator . distPath , config . adminPath ) . replace ( / \/ $ / , "" )
198
+ this . nuxt . hook ( "generate:distCopied" , async nuxt => {
199
+ await copy (
200
+ resolve ( nuxt . options . buildDir , "dist" , config . adminPath ) . replace (
201
+ / \/ $ / ,
202
+ ""
203
+ ) ,
204
+ join ( nuxt . distPath , config . adminPath ) . replace ( / \/ $ / , "" )
202
205
) ;
203
206
debug ( "Netlify CMS files copied" ) ;
204
207
} ) ;
You can’t perform that action at this time.
0 commit comments