Skip to content

Angular 10 build warning - CommonJS or AMD dependencies #224

Open
@clabough

Description

@clabough

Current Behavior

When using stacktrace-js in an Angular 10 project, the build process now displays the following errors:

WARNING in ...\Services\error-handler.service.ts depends on 'stacktrace-js'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in ...\node_modules\stacktrace-js\stacktrace.js depends on 'error-stack-parser'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in ...\node_modules\stacktrace-js\stacktrace.js depends on 'stacktrace-gps'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in ...\node_modules\stacktrace-js\stacktrace.js depends on 'stack-generator'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Steps to Reproduce (for bugs)

Import stacktrace-js like this in an Angular 10 project typescript file (e.g. service)

import * as StackTrace from "stacktrace-js";

Your Environment

  • stacktrace.js version: 2.0.2

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