Skip to content

Commit 1090f76

Browse files
committed
problem with pug compiler, doesn't work well cross platform, by using path.sep instead of /
1 parent 6933808 commit 1090f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/pug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ const compileHtml = () => {
8383
const html = compile(view, './pug/layout/')
8484
let file
8585
if (version === 'ajax') {
86-
file = view.replace('pug/', '').replace('.pug', '.html')
86+
file = view.replace(`pug${path.sep}`, '').replace('.pug', '.html')
8787
} else {
88-
file = view.replace('pug/views/', '').replace('.pug', '.html')
88+
file = view.replace(`pug${path.sep}views${path.sep}`, '').replace('.pug', '.html')
8989
}
9090
// Create tree
9191
mkdirp.sync(resolve(dest, dirname(file)))

0 commit comments

Comments
 (0)