date-fns "Module parse failed, need an appropriate loader"
Closed this issue · 0 comments
futura commented
Bug Report
Environment
- bulma-calendar 6.0.7
- Bulma version: 0.9.0
- OS: OSX 10.15.5
- Browser: Firefox Developer Edition v78
Current Behavior
Set of errors for each date-fns locale that look like this ...
11:46:36 webpacker.1 | WARNING in ./node_modules/bulma-calendar/node_modules/date-fns/locale/ar/index.d.ts 1:8
11:46:36 webpacker.1 | Module parse failed: Unexpected token (1:8)
11:46:36 webpacker.1 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
11:46:36 webpacker.1 | > declare module 'date-fns/locale/ar' { }
Input Code
import bulmaCalendar from "bulma-calendar/src/js/index";
./node_modules/bulma-calendar/node_modules/date-fns/locale/ar/index.d.ts is only one line ...
declare module 'date-fns/locale/ar' { }
Possible Solution
Typescript loading issue, but not sure if this is a bulma-calendar problem or something with my setup? I don't see any typescript dependencies in bulma-calendar. I'm able to install date-fns in my app as its own module with no errors.