diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 11091e2625509f12706972076997007bc9007053..7c5620679c4f69265f43cdf417af089636ff599b 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -127,12 +127,12 @@ const config = { '@theme-config', path.resolve(process.cwd(), 'docs/.vuepress/config') ) + config.output.filename(`${nowString}/${config.output.get('filename')}`); //输出文件名 + config.module.rule('images').use('url-loader').tap(changeLoaderOptions); + config.module.rule('fonts').use('url-loader').tap(changeLoaderOptions); + config.module.rule('media').use('url-loader').tap(changeLoaderOptions); + config.module.rule('svg').use('file-loader').tap(changeLoaderOptions); if (!isServer && process.env.NODE_ENV === 'production') { - config.output.filename(`${nowString}/${config.output.get('filename')}`); //输出文件名 - config.module.rule('images').use('url-loader').tap(changeLoaderOptions); - config.module.rule('fonts').use('url-loader').tap(changeLoaderOptions); - config.module.rule('media').use('url-loader').tap(changeLoaderOptions); - config.module.rule('svg').use('file-loader').tap(changeLoaderOptions); const extract_css_plugin = config.plugin('extract-css'); const extract_css_plugin_args = extract_css_plugin.get('args'); if (extract_css_plugin_args) {