mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
refactor: added ACI prefix to avoid external conflicts
This commit is contained in:
parent
0ba6025fb5
commit
ea4ab4c4eb
@ -82,7 +82,7 @@ const config = ({
|
|||||||
minimizer: [new TerserWebpackPlugin({ parallel: true })]
|
minimizer: [new TerserWebpackPlugin({ parallel: true })]
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [new DefinePlugin({ __DEV__: devBuild })]
|
plugins: [new DefinePlugin({ __ACI_DEV__: devBuild })]
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
|
|||||||
@ -25,10 +25,10 @@ declare global {
|
|||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
const __DEV__: boolean;
|
const __ACI_DEV__: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__ACI_DEV__) {
|
||||||
console.error(
|
console.error(
|
||||||
'You are using a development build. Make sure to use the correct build in production'
|
'You are using a development build. Make sure to use the correct build in production'
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
export {};
|
export {};
|
||||||
|
|
||||||
describe('tests __DEV__ usage', () => {
|
describe('tests __ACI_DEV__ usage', () => {
|
||||||
it('expects importing with __DEV__ true prints a warning', async () => {
|
it('expects importing with __ACI_DEV__ true prints a warning', async () => {
|
||||||
expect(__DEV__).toBeTruthy();
|
expect(__ACI_DEV__).toBeTruthy();
|
||||||
|
|
||||||
const oldLog = console.error;
|
const oldLog = console.error;
|
||||||
console.error = jest.fn();
|
console.error = jest.fn();
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
// @ts-expect-error __DEV__ is declared as const
|
// @ts-expect-error __ACI_DEV__ is declared as const
|
||||||
global.__DEV__ = true;
|
global.__ACI_DEV__ = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user