Initial checklist
Problem
Webpack supports a mode setting, which can be set to production, development, or none. MDX supports a boolean development, but does not use webpack’s mode.
It would make sense to set the MDX development option based on Webpack’s mode.
Solution
Default the MDX development option to Webpack’s mode === 'development'. If development is specified explicitly in the loader options, that should take precedence.
Alternatives
We could also use mode !== 'production', which would change the behaviour of the 'none' mode, but I think it’s best if 'none' would use the default value provided by @mdx-js/mdx.
Initial checklist
Problem
Webpack supports a
modesetting, which can be set toproduction,development, ornone. MDX supports a booleandevelopment, but does not use webpack’smode.It would make sense to set the MDX
developmentoption based on Webpack’smode.Solution
Default the MDX
developmentoption to Webpack’smode === 'development'. Ifdevelopmentis specified explicitly in the loader options, that should take precedence.Alternatives
We could also use
mode !== 'production', which would change the behaviour of the'none'mode, but I think it’s best if'none'would use the default value provided by@mdx-js/mdx.