File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const CONFIG_FILE_NAME = 'docusaurus.config.js';
1111export const GENERATED_FILES_DIR_NAME = '.docusaurus' ;
1212export const SRC_DIR_NAME = 'src' ;
1313export const STATIC_DIR_NAME = 'static' ;
14- export const STATIC_ASSETS_DIR_NAME = 'assets' ; // files handled by webpack
14+ export const OUTPUT_STATIC_ASSETS_DIR_NAME = 'assets' ; // files handled by webpack, hashed (can be cached aggressively)
1515export const THEME_PATH = `${ SRC_DIR_NAME } /theme` ;
1616export const DEFAULT_PORT = 3000 ;
1717export const DEFAULT_PLUGIN_ID = 'default' ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
1919 getCustomBabelConfigFilePath ,
2020 getMinimizer ,
2121} from './utils' ;
22- import { STATIC_ASSETS_DIR_NAME } from '../constants' ;
22+ import { STATIC_DIR_NAME } from '../constants' ;
2323
2424const CSS_REGEX = / \. c s s $ / ;
2525const CSS_MODULE_REGEX = / \. m o d u l e \. c s s $ / ;
@@ -96,7 +96,7 @@ export function createBaseConfig(
9696 // Allow resolution of url("/fonts/xyz.ttf") by webpack
9797 // See https://webpack.js.org/configuration/resolve/#resolveroots
9898 // See https://github.com/webpack-contrib/css-loader/issues/1256
99- path . join ( siteDir , STATIC_ASSETS_DIR_NAME ) ,
99+ path . join ( siteDir , STATIC_DIR_NAME ) ,
100100 siteDir ,
101101 process . cwd ( ) ,
102102 ] ,
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ import {TransformOptions} from '@babel/core';
2626import { ConfigureWebpackFn , ConfigurePostCssFn } from '@docusaurus/types' ;
2727import CssNanoPreset from '@docusaurus/cssnano-preset' ;
2828import { version as cacheLoaderVersion } from 'cache-loader/package.json' ;
29- import { BABEL_CONFIG_FILE_NAME , STATIC_ASSETS_DIR_NAME } from '../constants' ;
29+ import {
30+ BABEL_CONFIG_FILE_NAME ,
31+ OUTPUT_STATIC_ASSETS_DIR_NAME ,
32+ } from '../constants' ;
3033
3134// Utility method to get style loaders
3235export function getStyleLoaders (
@@ -275,7 +278,7 @@ export function getFileLoaderUtils(): Record<string, any> {
275278
276279 // defines the path/pattern of the assets handled by webpack
277280 const fileLoaderFileName = ( folder : AssetFolder ) =>
278- `${ STATIC_ASSETS_DIR_NAME } /${ folder } /[name]-[hash].[ext]` ;
281+ `${ OUTPUT_STATIC_ASSETS_DIR_NAME } /${ folder } /[name]-[hash].[ext]` ;
279282
280283 const loaders = {
281284 file : ( options : { folder : AssetFolder } ) => {
You can’t perform that action at this time.
0 commit comments