mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 05:42:34 +02:00
fix(v2): remove webpackConfig.resolve.symlinks: true (#5126)
* remove webpackConfig.resolve.symlinks: true * Add docs-test docs plugin instance to validate using a symlink folder as docs source is possible * comment * useful comments
This commit is contained in:
parent
7b2723717c
commit
dc9f104ccc
4 changed files with 20 additions and 1 deletions
|
@ -139,7 +139,7 @@ export function createBaseConfig(
|
||||||
resolve: {
|
resolve: {
|
||||||
unsafeCache: false, // not enabled, does not seem to improve perf much
|
unsafeCache: false, // not enabled, does not seem to improve perf much
|
||||||
extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||||
symlinks: true,
|
symlinks: false, // disabled on purpose (https://github.com/facebook/docusaurus/issues/3272)
|
||||||
roots: [
|
roots: [
|
||||||
// Allow resolution of url("/fonts/xyz.ttf") by webpack
|
// Allow resolution of url("/fonts/xyz.ttf") by webpack
|
||||||
// See https://webpack.js.org/configuration/resolve/#resolveroots
|
// See https://webpack.js.org/configuration/resolve/#resolveroots
|
||||||
|
|
|
@ -116,6 +116,17 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
|
||||||
showLastUpdateTime: true,
|
showLastUpdateTime: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'@docusaurus/plugin-content-docs',
|
||||||
|
{
|
||||||
|
// This plugin instance is used to test fancy edge cases
|
||||||
|
id: 'docs-tests',
|
||||||
|
// Using a symlinked folder as source, test against https://github.com/facebook/docusaurus/issues/3272
|
||||||
|
path: 'dogfooding/docs-tests-symlink',
|
||||||
|
routeBasePath: 'docs-tests',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'@docusaurus/plugin-content-blog',
|
'@docusaurus/plugin-content-blog',
|
||||||
{
|
{
|
||||||
|
|
1
website/dogfooding/docs-tests-symlink
Symbolic link
1
website/dogfooding/docs-tests-symlink
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
docs-tests
|
7
website/dogfooding/docs-tests/index.md
Normal file
7
website/dogfooding/docs-tests/index.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
slug: /
|
||||||
|
---
|
||||||
|
|
||||||
|
# Docs tests
|
||||||
|
|
||||||
|
This Docusaurus docs plugin instance is meant to test fancy edge-cases that regular unit tests don't really cover.
|
Loading…
Add table
Add a link
Reference in a new issue