bundlephobia icon indicating copy to clipboard operation
bundlephobia copied to clipboard

New React JSX Transform Supported?

Open bestickley opened this issue 3 years ago • 1 comments

Describe the bug I'm getting the error:

/tmp/tmp-build/packages/build-gboost-ui-uC2/node_modules/gboost-ui/lib/SmartInputs/SmartTransferList.js 16:238 Module parse failed: Unexpected token (16:238) File was processed with these loaders: * ./node_modules/shebang-loader/index.js * ./node_modules/string-replace-loader/index.js You may need an additional loader to handle the result of these loaders. | const { control, label, loading, name, ...transferListProps } = props; | const { field: { ref, onChange, value }, fieldState: { error, invalid }, } = useController({ name, control }); > return loading ? (_jsxs(Box, { css: { display: "flex", flexDirection: "column", gap: "$2" }, children: [_jsx("label", { className: "amplify-label", children: label }), _jsx(Placeholder, { height: `calc(${transferListProps.listHeight ?? defaultListHeight} + 42px)` })] })) : (_jsx(TransferList, { ...transferListProps, ref: ref, label: label, errorMessage: error?.message, hasError: invalid, onChange: onChange, value: value })); | } | @ /tmp/tmp-build/packages/build-gboost-ui-uC2/node_modules/gboost-ui/lib/SmartInputs/SmartInputs.js 2:0-59 2:0-59 @ /tmp/tmp-build/packages/build-gboost-ui-uC2/node_modules/gboost-ui/lib/index.js @ /tmp/tmp-build/packages/build-gboost-ui-uC2/index.js

I'm building the JS output from TS with the config: "jsx": "react-jsx". Is this not supported by Bundlephobia? I think this is using the new JSX transform so it's definitely possible this is an issue on my end. Thank you! To Reproduce https://bundlephobia.com/package/gboost-ui Expected behavior Successful build.

bestickley avatar Mar 25 '22 18:03 bestickley

In the error output, I think the key is that the code is referencing _jsxs which may be unknown by bundlephobia's builder?

bestickley avatar Mar 25 '22 18:03 bestickley