diff --git a/build/webpack.config.js b/build/webpack.config.js index 202693e..649accf 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -82,7 +82,7 @@ const config = ({ minimizer: [new TerserWebpackPlugin({ parallel: true })] }, - plugins: [new DefinePlugin({ __DEV__: devBuild })] + plugins: [new DefinePlugin({ __ACI_DEV__: devBuild })] }); module.exports = [ diff --git a/src/index.ts b/src/index.ts index 8d4495d..3509f0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,10 +25,10 @@ declare global { * * @internal */ - const __DEV__: boolean; + const __ACI_DEV__: boolean; } -if (__DEV__) { +if (__ACI_DEV__) { console.error( 'You are using a development build. Make sure to use the correct build in production' ); diff --git a/test/dev.test.ts b/test/dev.test.ts index 5f3ed30..75f8295 100644 --- a/test/dev.test.ts +++ b/test/dev.test.ts @@ -1,8 +1,8 @@ export {}; -describe('tests __DEV__ usage', () => { - it('expects importing with __DEV__ true prints a warning', async () => { - expect(__DEV__).toBeTruthy(); +describe('tests __ACI_DEV__ usage', () => { + it('expects importing with __ACI_DEV__ true prints a warning', async () => { + expect(__ACI_DEV__).toBeTruthy(); const oldLog = console.error; console.error = jest.fn(); diff --git a/test/setup.ts b/test/setup.ts index 286339e..7da7b82 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -1,2 +1,2 @@ -// @ts-expect-error __DEV__ is declared as const -global.__DEV__ = true; +// @ts-expect-error __ACI_DEV__ is declared as const +global.__ACI_DEV__ = true;