Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

8.0.0 breaks certain requires #179

@kylecordes

Description

@kylecordes

(Apologies, as I write this I only have a couple of minutes so I'm including a very non-minimal reproduction of a problem. If it turns out to be hard to reproduce, next week I can work on a minimal reproduction. Please ask, or even just close this issue if the non-minimal repro is too much of a problem! But I thought it useful to have the issue in to at least help anyone else affected.)

The following repo uses rollup-plugin-commonjs 7.0.0, and works:

https://github.com/OasisDigital/angular-aot-es2015-rollup/tree/rollup-plugin-commonjs-179

npm install; ./aot-build.sh

But with rollup-plugin-commonjs is changed to 8.0.0, it fails with the following:

node_modules/core-js/modules/_shared-key.js (7:4)
5: 
6: var shared = require$$0('keys')
7:   , ;
       ^
8: var _sharedKey = function(key){
9:   return shared[key] || (shared[key] = uid(key));

I think either Buble or Uglify is objecting to the syntax, and perhaps should instead accept it - but this syntax only appears with 8.0.0, and I saw there's recently been a change to the code handling rewriting of requires.

c8c2548

... so there is some chance that @Rich-Harris will simply see my snippet above and know what caused it.

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