Hello -
How can I include the themes and use them in my tsx (Typescript JSX)file...
import { DataTable } from 'primereact/components/datatable/DataTable'
import { Column } from 'primereact/components/column/Column'
import axios from 'axios'
import { Button } from 'primereact/components/button/Button'
import { Dialog } from 'primereact/components/dialog/Dialog'
import { InputText } from 'primereact/components/inputtext/InputText'
This didn't work
import 'primereact/resources/primereact.min.css'
Thanks, Shilpi
Including themes in tsx file
-
- Posts: 15
- Joined: 04 Apr 2018, 19:45
These are the errors that I got:
..\node_modules\primereact\resources\themes\omega\fonts\roboto-v15-latin-regular.woff2 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
Module parse failed: ..\node_modules\primereact\resources\themes\omega\fonts\roboto-v15-latin-regular.eot Unexpected character '' (1:2)
You may need an appropriate loader to handle this file type.
Thanks, Shilpi
..\node_modules\primereact\resources\themes\omega\fonts\roboto-v15-latin-regular.woff2 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
Module parse failed: ..\node_modules\primereact\resources\themes\omega\fonts\roboto-v15-latin-regular.eot Unexpected character '' (1:2)
You may need an appropriate loader to handle this file type.
Thanks, Shilpi
-
- Posts: 15
- Joined: 04 Apr 2018, 19:45
I got it to work, I needed to add the corresponding loader -
{ test: /\.(eot|woff|woff2|ttf)$/, loader: "file-loader" }
in webpack.config file.
Thanks, Shilpi
{ test: /\.(eot|woff|woff2|ttf)$/, loader: "file-loader" }
in webpack.config file.
Thanks, Shilpi
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot for the update!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 19 guests