Skip to content

Use XFC's transpiled code, not source #26

Description

@pgross41

This (cerner-smart-embeddable-lib.js#L3):

import Provider from 'xfc/src/provider';

Should be this:

import Provider from 'xfc/lib/provider';

Or better yet:

import { Provider } from 'xfc';

That change will allow apps to import the ES6 module

import 'cerner-smart-embeddable-lib';

Instead of plucking out the pre-built version

import './vendor/cerner-smart-embeddable-lib-1.3.0';

PowerChart errors with the ES6 module because of this spread operator in XFC (possibly other reasons too but this is the first error). It works if cerner-smart-embeddable-lib includes the lib version though.

Using the ES6 module will also allow apps to disable XFC logging by defining process.env.NODE_ENV per the readme. Thus partially resolving these issues:

The info about process.env.NODE_ENV should also be documented on this project's readme. There is no way a user would know the logging is coming from a dependency nor how to disable it.

I say the issues are "partially resolved" because non-webpack users will still have no way to disable logging. XFC should probably provide a run-time config to disable logging so that users of the pre-build .min.js version of cerner-smart-embeddable-lib can turn it off and utilize f-twelve.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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