Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic development mode in Webpack loader #2198

Closed
4 tasks done
remcohaszing opened this issue Dec 22, 2022 · 1 comment · Fixed by #2201
Closed
4 tasks done

Automatic development mode in Webpack loader #2198

remcohaszing opened this issue Dec 22, 2022 · 1 comment · Fixed by #2201
Labels
💪 phase/solved Post is done

Comments

@remcohaszing
Copy link
Member

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.

@wooorm
Copy link
Member

wooorm commented Dec 22, 2022

yep, sounds good

@wooorm wooorm added the 👍 phase/yes Post is accepted and can be worked on label Dec 22, 2022
wooorm pushed a commit that referenced this issue Dec 26, 2022
Closes GH-2198.
Closes GH-2201.

Reviewed-by: Christian Murphy <[email protected]>
Reviewed-by: Titus Wormer <[email protected]>
@wooorm wooorm added 💪 phase/solved Post is done and removed 👍 phase/yes Post is accepted and can be worked on labels Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

Successfully merging a pull request may close this issue.

2 participants