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

#if _DEBUG blocks are always removed in packages' default exports #8874

Closed
SuperSodaSea opened this issue Nov 21, 2022 · 1 comment · Fixed by #8875
Closed

#if _DEBUG blocks are always removed in packages' default exports #8874

SuperSodaSea opened this issue Nov 21, 2022 · 1 comment · Fixed by #8875

Comments

@SuperSodaSea
Copy link
Member

The _DEBUG is only defined when building plugins / bundles, so the #if _DEBUG blocks are always removed in packages' default exports. If users are using PixiJS with a bundler, they will never recieve deprecation warnings in #if _DEBUG blocks.

For example, in 7.1.0-alpha, the user will never recieve the deprecation warning with:

import { ShaderSystem } from '@pixi/core';
import { install } from '@pixi/unsafe-eval';

install({ ShaderSystem });

I wondered if there is a good way to solve this problem. Maybe by adding "development" and "production" fields in "exports" in package.json?

@SuperSodaSea SuperSodaSea changed the title #if _DEBUG blocks are always removed in seperate packages #if _DEBUG blocks are always removed in packages' default exports Nov 21, 2022
@bigtimebuddy
Copy link
Member

Good catch! This was an oversight. I had assumed debug statements would be included in lib/* output. But it wasn't.

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 a pull request may close this issue.

2 participants