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

feat: introduce env var to include dev server plugin #6410

Merged
merged 4 commits into from Mar 5, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/commands/dev/dev.ts
Expand Up @@ -137,6 +137,11 @@ export const dev = async (options: OptionValues, command: BaseCommand) => {
try {
settings = await detectServerSettings(devConfig, options, command)

if (process.env.NETLIFY_INCLUDE_DEV_SERVER_PLUGIN) {
log(`${NETLIFYDEVLOG} Including dev server plugin`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the customer-facing name we're going with? And is there value in showing this message? I believe we'll still show a generic message from Netlify Build indicating that this plugin is being loaded? I would consider printing this only if debug is true.

settings.plugins = [...(settings.plugins || []), '@netlify/plugin-dev-server']
}

cachedConfig.config = getConfigWithPlugins(cachedConfig.config, settings)
} catch (error_) {
if (error_ && typeof error_ === 'object' && 'message' in error_) {
Expand Down