pocka / figspec-react

React binding for Figspec web components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import error when using @figspec/react

karanmidha opened this issue · comments

Hi, I was using ^1 of figspec which was working fine. I tried to update to the v2 today and my imports started failing.
This is the error that I am getting. How can we resolve this?

image

My import looks like this
import { FigspecFileViewer } from "@figspec/react";

@pocka

What platform/bundler/transpiler are you using?

I am using webpack v5.88.0

It seems because of the library (@figspec/components and @figspec/react) files still use extension-less import.
I'll check the configuration later.

Published @figspec/components@2.0.2, which adds .js to every extension-less import paths.