Skip to content

Unable to build with firebase as import #87

@jmadler

Description

@jmadler

I'm unable to build a project that has firebase as an import. It looks like some of the build steps are preprocessing imported modules in a way that's breaking uglify.

Environment:

  • macOS Sierra
  • firebase 4.1.1
  • node v7.10.0
  • npm 4.6.1
  • yarn 0.24.5
  • preact-cli 1.1.0
  • preact 8.1.0
  • uglify-js 3.0.14

Reproduction steps:

$ preact create sample
$ cd sample
$ yarn add firebase
$ edit src/index.js # Add: import firebase from 'firebase';
$ yarn run build
  yarn run v0.24.5
  $ preact build
  bundle.js from UglifyJs
  Unexpected token: punc ()) [bundle.js:5468,33]
  ✨  Done in 6.07s.

Here's a copy of the bundle.js. Note the () on line 5470 around char 33.

CC @addyosmani @jshcrowthe

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