Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* eslint-disable @typescript-eslint/no-empty-function */
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
- function ZipPlugin() {}
- ZipPlugin.prototype.apply = function applyZipPlugin(compiler) {
- compiler.hooks.emit.tapAsync({ name: 'ZipPlugin' }, function tapAsync(compilation, callback) {
- const { assets } = compilation;
- if (compilation.compiler.isChild()) {
- callback();
- }
- console.log(Object.keys(assets));
- callback();
- });
- };
- module.exports = ZipPlugin;
- /* eslint-enable @typescript-eslint/no-empty-function */
- /* eslint-enable @typescript-eslint/explicit-function-return-type */
- const path = require('path'); // eslint-disable-line @typescript-eslint/no-var-requires
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); // eslint-disable-line @typescript-eslint/no-var-requires
- const ZipPlugin = require('./ci_cd/zip.webpack.plugin.js'); // eslint-disable-line @typescript-eslint/no-var-requires
- module.exports = {
- mode: 'production',
- devtool: 'inline-source-map',
- entry: {
- investorprofile: './src/lambdas/investor-profile/index.ts',
- portfoliorecommendation: './src/lambdas/portfolio-recommendation/index.ts',
- },
- output: {
- path: path.join(__dirname, 'dist'),
- filename: '[name]',
- },
- resolve: {
- extensions: ['.ts'],
- plugins: [new TsconfigPathsPlugin()],
- },
- module: {
- rules: [
- {
- test: /.ts$/,
- use: [{ loader: 'ts-loader', options: { transpileOnly: true } }],
- },
- ],
- },
- plugins: [new ZipPlugin()],
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement