UNPKG

@flowaccount/nx-aws-cdk

Version:

aws-cdk executors and generators for nx workspace

24 lines 839 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withExternals = void 0; // @example withExternals([/^@aws-sdk\//, /^@aws-lambda-powertools\//]) function withExternals(externals) { return function configure(config) { config.externals = Array.isArray(config.externals) ? config.externals : config.externals ? [config.externals] : []; config.externals.push(function (ctx, callback) { if (externals.some((e) => e.test(ctx.request))) { // not bundled return callback(null, `commonjs ${ctx.request}`); } // bundled callback(); }); return config; }; } exports.withExternals = withExternals; //# sourceMappingURL=with-externals.js.map