๋ฉ”์ธ ์ปจํ…์ธ ๋กœ ์ด๋™
Version: 2.0.0-beta.20

๐Ÿ“ฆ plugin-debug

๋””๋ฒ„๊ทธ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋ฉด http://localhost:3000/__docusaurus/debug์— ์ ‘์†ํ•ด์„œ ์œ ์šฉํ•œ ๋””๋ฒ„๊ทธ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

.docusaurus ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ์ฝ˜ํ…์ธ (๊ฒฝ๋กœ ๋งŒ๋“ค๊ธฐ ๊ฐ™์€)๋ฅผ ์‰ฝ๊ฒŒ ๊ฒ€์‚ฌํ•  ์ˆ˜ ์žˆ์„ ๋ฟ ์•„๋‹ˆ๋ผ contentLoaded ์ˆ˜๋ช… ์ฃผ๊ธฐ๋ฅผ ํ†ตํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฐ์ดํ„ฐ๊ฐ€ ๋กœ๋“œ๋˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋””์Šคํฌ์— ์“ฐ์ง€ ์•Š๋Š” ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ๊ฒ€์‚ฌํ•ด์•ผ ํ•  ๋•Œ ํ”Œ๋Ÿฌ๊ทธ์ธ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ์œ ์šฉํ•œ ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค.

info

If you use the plugin via the classic preset, the preset will enable the plugin in development and disable it in production by default (debug: undefined) to avoid exposing potentially sensitive information. You can use debug: true to always enable it or debug: false to always disable it.

If you use a standalone plugin, you may need to achieve the same effect by checking the environment:

docusaurus.config.js
module.exports = {
plugins: [
process.env.NODE_ENV === 'production' && '@docusaurus/plugin-debug',
].filter(Boolean),
};
note

๋ฒ„๊ทธ๋ฅผ ๋ฐœ๊ฒฌํ•˜๊ณ  ๋“ฑ๋กํ•˜๋ ค๋Š” ๊ฒฝ์šฐ ํ•ด๋‹น ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ™œ์„ฑํ™”ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•  ๊ฒ๋‹ˆ๋‹ค. ํ•ด๋‹น ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ๋ถ„์˜ ๋ฐฐํฌ ์„ค์ •์„ ์ข€ ๋” ์‰ฝ๊ฒŒ ๊ฒ€์‚ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

If you don't have any sensitive information, you can keep it on in production like we do.

์„ค์น˜โ€‹

npm install --save @docusaurus/plugin-debug
tip

@docusaurus/preset-classic์„ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ์—๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๋”ฐ๋กœ ์„ค์น˜ํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

You can configure this plugin through the preset options.

์„ค์ •โ€‹

This plugin currently has no options.

์„ค์ • ์˜ˆ์‹œโ€‹

You can configure this plugin through preset options or plugin options.

tip

Most Docusaurus users configure this plugin through the preset options.

If you use a preset, configure this plugin through the preset options:

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
debug: true, // This will enable the plugin in production
},
],
],
};