Able to choose between component/xcomponent.frame when importing
See original GitHub issueHello,
We’re using xcomponent (which is an awesome library, good work!) in a TypeScript/webpack project which means we use npm to install xcomponent and then import it:
import * as xcomponent from 'xcomponent'
The problem is we want to use the xcomponent without the ie-bridge since it causes errors in IE11 (somehow it thinks we want to use the bridge even though we don’t use popups). I don’t think we need to dig in this bug since without the IE-specific bridge code it works. If we look how react solves this (dev build vs prod build) they use environment variables to be able to choose which build should be included: https://github.com/facebook/react/blob/master/packages/react/npm/index.js
I was thinking if this might be a good idea for xcomponent as well? Maybe introduce a environment variable and let the user choose if one wan’t to import the whole thing or without iframe support?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (10 by maintainers)
I’m using webpack as well and recently changed the xcomponent dependency to zoid. I saw the build size more than double, a similar experience as @doublemarked. I’m still debugging, but found myself on this issue and wanted to note my findings.
xcomponent 6.0.49 was the previous install version.
I’m having the same issue.
This does not work, zoid is undefined
This does not work either
This somehow works:
I’m using “zoid”: “9.0.42”