Skip to content

Published NPM Code includes ES6 Features #168

@Aubron

Description

@Aubron

This makes it incompatible with create-react-app and other projects.

Tested with fb and fb@next

duplicate of #147, but it was closed.

Create react app throws the following:

yarn run v1.3.2
$ react-scripts build
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/fb/lib/fb.js:130 

Read more here: http://bit.ly/2tRViJ9

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1

runinng the file (fb.js) through JSHint shows a lot of ES6 syntax present, including the following:

634 | 'template literal syntax' is only available in ES6 (use 'esversion: 6').
681 | 'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
686 | 'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

I assume it's just a babel configuration issue. I took a stab at locating it, unsuccessfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions