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:
Sébastien Lorber 2021-07-08 18:59:56 +02:00 committed by GitHub
parent 7b2723717c
commit dc9f104ccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View file

@ -139,7 +139,7 @@ export function createBaseConfig(
resolve: {
unsafeCache: false, // not enabled, does not seem to improve perf much
extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
symlinks: true,
symlinks: false, // disabled on purpose (https://github.com/facebook/docusaurus/issues/3272)
roots: [
// Allow resolution of url("/fonts/xyz.ttf") by webpack
// See https://webpack.js.org/configuration/resolve/#resolveroots

View file

@ -116,6 +116,17 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
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',
{

View file

@ -0,0 +1 @@
docs-tests

View 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.