packages/babel-preset-dufl/webpack-overrides.js
// This function transforms the Babel configuration on a per-file basis
This function transforms the Babel configuration on a per-file basis
This function transforms the Babel configuration on a per - file basis
config(config, { source }) {
    if (macroCheck.test(source)) {
      return {
        ...config.options,
        caller: {
          ...config.options.caller,
          craInvalidationToken: crypto.randomBytes(32).toString('hex'),
        },
      };
    }
    return config.options;
  }
config ( config , { source } ) { if ( macroCheck . test ( source ) ) { return { ... config . options , caller : { ... config . options . caller , craInvalidationToken : crypto . randomBytes ( 32 ) . toString ( 'hex' ) , } , } ; } return config . options ; }
This function transforms the Babel configuration on a per-file basis
This function transforms the Babel configuration on a per - file basis
// Babel Macros are notoriously hard to cache, so they shouldn't be // https://github.com/babel/babel/issues/8497 // We naively detect macros using their package suffix and add a random token // to the caller, a valid option accepted by Babel, to compose a one-time // cacheIdentifier for the file. We cannot tune the loader options on a per // file basis.