Skip to content

Automatic development mode in Webpack loader #2198

@remcohaszing

Description

@remcohaszing

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions