Skip to content

webpack externals require manual entry in package.json of build output #64

@dpsthree

Description

@dpsthree

My Forge backend code utilizes the AWS Lamda library, @aws-sdk/client-lambda. This has the unfortunate behavior of taking an implicit requirement on the aws-sdk root-level package. Long story short, to get this to work with the current webpack process required that I list aws-sdk as a webpack external


module.exports = composePlugins(withNx(), (config) => {
  config.externals = {
    'aws-sdk': 'aws-sdk',
  };
  return config;
});

This compiles correctly, but the package.json file copied to the dist directory does not include aws-sdk because of the implicit dependency. It would be nice if the nx-forge build process processes any externals and copies their package.json entries to the build directory.

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