diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 5579c8e3483a64dae471b364adbb66d1dd88cc6f..9880a26318fc7eedab2306f12fa2acd7afd39765 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -127,13 +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) { diff --git a/package.json b/package.json index 0d54dd1a74063e4341bbb6b240952879bb9743bb..d6145bc8db99d54af7c2432e3caa69e1ea8f5168 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "markdown-it-raw-table": "^1.0.0", "markdown-it-task-lists": "^2.1.1", "vuepress-plugin-named-chunks": "^1.1.4", - "vuepress-theme-uni-app-test": "^1.3.28" + "vuepress-theme-uni-app-test": "^1.3.29" }, "dependencies": { "@docsearch/js": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 6d6c8339e92c8f90e067078740144c764df6f4ca..ca15dd94e7756820caca7abe90382bb2ab8e05eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9259,10 +9259,10 @@ vuepress-plugin-zooming@^1.1.8: dependencies: zooming "^2.1.1" -vuepress-theme-uni-app-test@^1.3.28: - version "1.3.28" - resolved "https://registry.npmmirror.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.3.28.tgz#337fa80dca4bb45ae97c8934f10f637a44e7efc5" - integrity sha512-aMjCunFXvXTpYSRZSANxSJDnN/ESxaEPaxwC1wlViwoVKu5HXQq9bPW3QnXOm35UowVh/pUUbOGBCySi9rY0MQ== +vuepress-theme-uni-app-test@^1.3.29: + version "1.3.29" + resolved "https://registry.npmmirror.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.3.29.tgz#4e14ab580adf80de1b765d95b4a51c5bbd3dae7f" + integrity sha512-xWgSPP4sV/KwOHcYMeIpNhFWBRJO+jV42djG+p+RUETa8CpUkMsTqEIowm4txHBNy7uRlMOpGl9MY6DcxOOtUA== dependencies: "@vuepress/plugin-back-to-top" "^1.9.5" "@vuepress/theme-default" "^1.8.2"