diff --git a/.changeset/forty-apes-teach.md b/.changeset/forty-apes-teach.md new file mode 100644 index 0000000000..715d6a84f7 --- /dev/null +++ b/.changeset/forty-apes-teach.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-serializer-csv': patch +--- + +Fix: Named export 'parse' not found. diff --git a/packages/serializer-csv/src/deserializer/types.ts b/packages/serializer-csv/src/deserializer/types.ts index ca48ac064c..75a319845d 100644 --- a/packages/serializer-csv/src/deserializer/types.ts +++ b/packages/serializer-csv/src/deserializer/types.ts @@ -1,4 +1,4 @@ -import { ParseConfig } from 'papaparse'; +import type { ParseConfig } from 'papaparse'; export type DeserializeCsvParseOptions = ParseConfig; diff --git a/packages/serializer-csv/src/deserializer/utils/deserializeCsv.ts b/packages/serializer-csv/src/deserializer/utils/deserializeCsv.ts index 13e66e6d27..509e363c0e 100644 --- a/packages/serializer-csv/src/deserializer/utils/deserializeCsv.ts +++ b/packages/serializer-csv/src/deserializer/utils/deserializeCsv.ts @@ -14,11 +14,13 @@ import { ELEMENT_TH, ELEMENT_TR, } from '@udecode/plate-table'; -import { parse } from 'papaparse'; +import papaparse from 'papaparse'; import { KEY_DESERIALIZE_CSV } from '../createDeserializeCsvPlugin'; import { DeserializeCsvParseOptions, DeserializeCsvPlugin } from '../types'; +const { parse } = papaparse; + const isValidCsv = ( data: Record[][], errors: Record[][],