Skip to content

Latest commit

 

History

History
14 lines (13 loc) · 362 Bytes

WEBPACK_EXAMPLE.MD

File metadata and controls

14 lines (13 loc) · 362 Bytes

Webpack Example

if (process.env.NODE_ENV !== 'production') {
  // Import agnostic axe here.
  // Webpack will comment out this code in production.
  import('https://unpkg.com/agnostic-axe@3').then(
    ({ AxeObserver, logViolations }) => {
      const MyAxeObserver = new AxeObserver(logViolations)
      MyAxeObserver.observe(document)
    }
  )
}