mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 17:47:40 +02:00
fix(v2): pass images in static dir to webpack-loader (#3283)
* pass static images to webpack-loader * remove console.log * fix windows path issue * fix windows path issue * add missing deps
This commit is contained in:
parent
eb4aa19bef
commit
12e9ff6232
6 changed files with 47 additions and 26 deletions
|
@ -27,7 +27,10 @@ import {Configuration, Loader} from 'webpack';
|
|||
import admonitions from 'remark-admonitions';
|
||||
import {PluginOptionSchema} from './pluginOptionSchema';
|
||||
import {ValidationError} from '@hapi/joi';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {
|
||||
DEFAULT_PLUGIN_ID,
|
||||
STATIC_DIR_NAME,
|
||||
} from '@docusaurus/core/lib/constants';
|
||||
|
||||
import {PluginOptions, LoadedContent, Metadata} from './types';
|
||||
|
||||
|
@ -178,6 +181,7 @@ export default function pluginContentPages(
|
|||
options: {
|
||||
remarkPlugins,
|
||||
rehypePlugins,
|
||||
staticDir: path.join(siteDir, STATIC_DIR_NAME),
|
||||
// Note that metadataPath must be the same/in-sync as
|
||||
// the path from createData for each MDX.
|
||||
metadataPath: (mdxPath: string) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue