Hi everyone! I'm having trouble loading polaris-viz into a Shopify app.
I suspect that this might be something wrong with my bundling strategy (vite + swc), but since I'm able to import other modules without a problem (like @shopify/polaris) I thought it was worth asking here.
Expected behavior
Able to import from polaris-viz
Actual behavior
When I add the following line
import { PolarisVizProvider } from '@shopify/polaris-viz'
I get the following error
Failed to resolve import "@shopify/polaris-viz" from "web/routes/campaign.jsx". Does the file exist?
I also get the same error if I try
import { PolarisVizProvider } from '@shopify/polaris-viz/build/esm/index'
Bug summary
Hi everyone! I'm having trouble loading polaris-viz into a Shopify app.
I suspect that this might be something wrong with my bundling strategy (vite + swc), but since I'm able to import other modules without a problem (like
@shopify/polaris
) I thought it was worth asking here.Expected behavior
Able to import from polaris-viz
Actual behavior
When I add the following line
I get the following error
I also get the same error if I try
Specifications