I am using svelte@3.50.1 and I have a component library that I run locally with Storybook.
Since I added a new library that uses optional chaining (?.) the code would not build and I am getting the following error:
ERROR in ./node_modules/svelte-flatpickr/src/Flatpickr.svelte 172:18
Module parse failed: Unexpected token (172:18)
File was processed with these loaders:
* ./node_modules/@storybook/svelte/dist/cjs/server/svelte-docgen-loader.js
* ./node_modules/svelte-loader/index.js
You may need an additional loader to handle the result of these loaders.
|
| function updateValue(newValue, dateStr, fp) {
> const mode = fp?.config?.mode ?? 'single';
| $$invalidate(2, value = mode === 'single' ? newValue[0] : newValue);
| $$invalidate(4, formattedValue = dateStr);
I don't have any rollup or webpack config in the app. Any advice on how to handle this? Thank you!