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

Fix dev jsxruntimepath #383

Closed
wants to merge 2 commits into from

Conversation

2239559319
Copy link

fix __DEV__ define and jsx-runtime not found in monorepo

@vercel
Copy link

vercel bot commented Aug 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
icepkg ❌ Failed (Inspect) Aug 20, 2022 at 0:39AM (UTC)

@2239559319
Copy link
Author

2239559319 commented Aug 20, 2022

resolve #350 #374

@@ -4,6 +4,8 @@ import { TaskName } from '../types.js';
import type { UserConfig } from '../types.js';
import type { Config, ModuleConfig } from '@swc/core';

const __DEV__ = `${process.env.NODE_ENV === 'development'}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不应该直接判断好是 dev 还是 production 吗

Copy link
Author

Choose a reason for hiding this comment

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

源码image
未修改的
image
修复后的image

@wssgcg1213
Copy link
Contributor

image

DEV 和 process.env.NODE_ENV 是两个变量, 在目前最新的 1.3.0 版本已经修复掉了, 感谢你的 PR, 这里先 Close 了

@wssgcg1213 wssgcg1213 closed this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants