I want to use react-toastify (https://github.com/fkhadra/react-toastify) at a custom component. It's instruction suggests to import css file like import 'react-toastify/dist/ReactToastify.css';. When I try to add this import to a adminbro component, it raises
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
at error (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:5265:30)
at Module.error (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:9858:16)
at tryParse (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:9739:23)
at Module.setSource (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:10165:19)
at ModuleLoader.addModuleSource (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:18335:20)
at async ModuleLoader.fetchModule (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:18391:9)
at async Promise.all (index 2)
at async ModuleLoader.fetchStaticDependencies (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:18416:34)
at async Promise.all (index 0)
at async ModuleLoader.fetchModule (/Users/andrey/WebstormProjects/untitled2/node_modules/rollup/dist/shared/rollup.js:18393:9)
I've tried several solution, but none worked. Simple example that reproduces the error
index.js
I want to use react-toastify (https://github.com/fkhadra/react-toastify) at a custom component. It's instruction suggests to import css file like
import 'react-toastify/dist/ReactToastify.css';
. When I try to add this import to a adminbro component, it raisesI've tried several solution, but none worked. Simple example that reproduces the error index.js
my-dashboard-component.tsx
package.json