Skip to content

Commit

Permalink
fix: publicPath 没有处理md, jsx 带来问题
Browse files Browse the repository at this point in the history
  • Loading branch information
苏文雄 committed Jan 8, 2021
1 parent 53154a4 commit 06eb6ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ydoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const ydoc = {

importFilepath = path.isAbsolute(importFilepath)? importFilepath : path.resolve(ydoc.config.dist, importFilepath);
if(publicPath){
if(path.extname(url.parse(importFilepath).pathname) !== '.html'){
const pageExts = ['.html', '.md', '.jsx'];
if(!pageExts.includes(path.extname(url.parse(importFilepath).pathname))){
return publicPath + importFilepath.substr(ydoc.config.dist.length);
}
}
Expand Down

0 comments on commit 06eb6ff

Please sign in to comment.