提交 40da453d 编写于 作者: D DCloud_LXH

feat(build): 资源引用

上级 e2cbf1ba
...@@ -127,12 +127,12 @@ const config = { ...@@ -127,12 +127,12 @@ const config = {
'@theme-config', '@theme-config',
path.resolve(process.cwd(), 'docs/.vuepress/config') path.resolve(process.cwd(), 'docs/.vuepress/config')
) )
if (!isServer && process.env.NODE_ENV === 'production') {
config.output.filename(`${nowString}/${config.output.get('filename')}`); //输出文件名 config.output.filename(`${nowString}/${config.output.get('filename')}`); //输出文件名
config.module.rule('images').use('url-loader').tap(changeLoaderOptions); config.module.rule('images').use('url-loader').tap(changeLoaderOptions);
config.module.rule('fonts').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('media').use('url-loader').tap(changeLoaderOptions);
config.module.rule('svg').use('file-loader').tap(changeLoaderOptions); config.module.rule('svg').use('file-loader').tap(changeLoaderOptions);
if (!isServer && process.env.NODE_ENV === 'production') {
const extract_css_plugin = config.plugin('extract-css'); const extract_css_plugin = config.plugin('extract-css');
const extract_css_plugin_args = extract_css_plugin.get('args'); const extract_css_plugin_args = extract_css_plugin.get('args');
if (extract_css_plugin_args) { if (extract_css_plugin_args) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册