Skip to content

Commit e02e7c0

Browse files
committed
feat: 增加静态文件地址输出,可使用 require()
1 parent 214730f commit e02e7c0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

theme/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ module.exports = (options, ctx) => {
7575
},
7676
],
7777
});
78+
79+
// static file
80+
config.module
81+
.rule('static-file')
82+
.test(/\.(file)(\..*)?$/)
83+
.use('file-loader')
84+
.loader('file-loader')
85+
.options({
86+
name: 'assets/file/[name].[hash:8].[ext]',
87+
});
7888
},
7989
extendMarkdown: md => {
8090
md.set({ breaks: true });

0 commit comments

Comments
 (0)