Skip to content

Commit

Permalink
Fix import warning for webpack 5 (prebid#5933)
Browse files Browse the repository at this point in the history
Webpack 5 emits a warning when importing named exports from json files:

```
"WARNING in ../../node_modules/prebid.js/src/secureCreatives.js 15:16-30
Should not import the named export 'EVENTS'.'BID_WON' (imported as 'EVENTS') from default-exporting module (only default export is available soon)"
```

Co-authored-by: Garth Poitras <[email protected]>
Co-authored-by: gpoitch <[email protected]>
  • Loading branch information
3 people authored Nov 20, 2020
1 parent 172df7f commit 578213c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/secureCreatives.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

import events from './events.js';
import { fireNativeTrackers, getAssetMessage } from './native.js';
import { EVENTS } from './constants.json';
import constants from './constants.json';
import { logWarn, replaceAuctionPrice } from './utils.js';
import { auctionManager } from './auctionManager.js';
import find from 'core-js-pure/features/array/find.js';
import { isRendererRequired, executeRenderer } from './Renderer.js';
import includes from 'core-js-pure/features/array/includes.js';

const BID_WON = EVENTS.BID_WON;
const BID_WON = constants.EVENTS.BID_WON;

export function listenMessagesFromCreative() {
window.addEventListener('message', receiveMessage, false);
Expand Down

0 comments on commit 578213c

Please sign in to comment.