"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.babel = exports.postConfig = void 0;
const webpack_blocks_1 = require("webpack-blocks");
// Code copied from: https://github.com/andywer/webpack-blocks/blob/master/packages/babel/index.js
exports.postConfig = (context, util) => {
    const ruleConfig = {
        test: /\.tsx?$/,
        ...context.match,
        use: [
            {
                loader: require.resolve('babel-loader'),
                options: context.babel,
            },
        ],
    };
    return util.addLoader(ruleConfig);
};
exports.babel = (options) => Object.assign(webpack_blocks_1.babel(options), { post: exports.postConfig });
