Skip to content

NodeJS Webpack builder #116

@buggy

Description

@buggy

Description:

I'm proposing to add a new nodejs webpack builder that would be triggered by the presence of a webpack.config.js file.

There are two uses I can see:

  1. As a Node developer I want to use TypeScript or Babel to compile my code from a more recent version of Javascript to a version supported by AWS Lambda.
  2. As a Node developer I want to use tree shaking to reduce the size of my code.

The builder could be based on the existing nodejs npm builder. It would build the code using a command like npx webpack-cli app.ts -o ../.aws-ts/build/HelloWorldFunction/app.js --config ./webpack.config.js instead of using npm pack. The package.json would probably need to be copied independently.

The Serverless Framework uses the same approach (a serverless-webpack plugin) for TypeScript support through the webpack ts-loader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions