Skip to content

Commit

Permalink
feat: 增加静态文件地址输出,可使用 require()
Browse files Browse the repository at this point in the history
  • Loading branch information
zyao89 committed Feb 24, 2020
1 parent 214730f commit e02e7c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ module.exports = (options, ctx) => {
},
],
});

// static file
config.module
.rule('static-file')
.test(/\.(file)(\..*)?$/)
.use('file-loader')
.loader('file-loader')
.options({
name: 'assets/file/[name].[hash:8].[ext]',
});
},
extendMarkdown: md => {
md.set({ breaks: true });
Expand Down

0 comments on commit e02e7c0

Please sign in to comment.