UNPKG

@nx/webpack

Version:

The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.

18 lines (17 loc) 694 B
module.exports = require('babel-loader').custom(() => { return { customOptions({ isTest, isModern, emitDecoratorMetadata, ...loader }) { return { custom: { isTest, isModern, emitDecoratorMetadata }, loader, }; }, config(cfg, { customOptions: { isTest, isModern, emitDecoratorMetadata } }) { // Add hint to our babel preset so it can handle modern vs legacy bundles. cfg.options.caller.isModern = isModern; cfg.options.caller.isTest = isTest; cfg.options.caller.emitDecoratorMetadata = emitDecoratorMetadata; return cfg.options; }, }; });