Skip to content

Updating to @rollup/plugin-commonjs@17.0.0 breaks svelte application using Amplify libs #762

@rhard

Description

@rhard
  • Rollup Plugin Name: plugin-commonjs
  • Rollup Plugin Version: 17.0.0
  • Rollup Version: 2.3.4
  • Operating System (or Browser): Windows/Chrome
  • Node Version: 15.5.1
  • Link to reproduction (⚠️ read below): https://repl.it/@RhardRoman/rollup-plugin-repro

Expected Behavior

The project can be build and viewed in Chrome

Actual Behavior

After updating plugin-commonjs to 17.0.0 and using @aws-amplify/core the Chrome throws an error:

Uncaught ReferenceError: exports is not defined
    at CryptoOperation.js:2
    at main.js:31

Error source:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=CryptoOperation.js.map

Additional Information

Just adding the Amplify core lib stops the project from working. With 16.0.0 everything is OK.

import Amplify from '@aws-amplify/core';

Amplify.configure();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions