Closed lxe closed 5 years ago
So we can reproduce your build environment, do you have a .fusionrc.js
file? If so, can you share the contents of that file here?
@KevinGrandon it's empty. See repro steps. This happens in vanilla scaffold.
Yep, easily reproducible. Maybe a misconfiguration? https://github.com/babel/babel/issues/5240
curious if there was any update on this? for now we have to patch fusion using the following mechanism so it doesn't add the use_strict
directive. This is an issue impacting more than just this module. Any module published to npm that relies on non-use_strict
behavior is impacted.
{
name: `Fix D3, protobuf and other modules that should not be prefixed with 'use strict;'`,
details: '',
file: './node_modules/fusion-cli/build/compiler.js',
original: `
/node_modules\\/react-dom\\//,
/node_modules\\/react\\//,
/node_modules\\/core-js\\//,`,
patch: `
/node_modules\\/react-dom\\//,
/node_modules\\/react\\//,
// -- START PATCH FIX -- //
// see: web-monorepo:/common/server/scripts/patches/index.js
/node_modules\\/d3\\//,
/node_modules\\/@uber\\/react-auto\\//,
/node_modules\\/keymaster\\//,
/node_modules\\/ansi-color\\//,
/node_modules\\/webgl-debug\\//,
// -- END PATCH FIX -- //
/node_modules\\/core-js\\//,`,
},
Type of issue
Bug
Description
If you import
ansi-color
package and attempt tofusion {dev/build}
to bundle the project, the build fails with this error:Steps to reproduce
Your environment
fusion-cli version: 1.9.0
Node.js version (
node --version
): v8.12.0npm version (
npm --version
): yarn 1.10.1Operating System: Mac