google font link doesn't work
hhhluke opened this issue · 2 comments
Hi:
I saw code below in every material.css
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
this link sometimes doesn't work, how can I remove it ?
Thanks
Hi @dryqiao,
Greetings from Syncfusion support,
We have prepared a small utility to resolve the reported issue at our end. Please follow the below steps to add our utility.
Step 1: Create a new js file and name it as remove-external.js. Then add the following scripts to that file.
var fs = require('fs');
var tailwindCnt = fs.readFileSync('./node_modules/@syncfusion/ej2-base/styles/tailwind.css','utf-8');
tailwindCnt = tailwindCnt.replace('@import url(https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap);',' ');
fs.writeFileSync('./node_modules/@syncfusion/ej2-base/styles/tailwind.css',tailwindCnt);var tailwindDarkCnt = fs.readFileSync('./node_modules/@syncfusion/ej2-base/styles/tailwind-dark.css','utf-8');
tailwindDarkCnt = tailwindDarkCnt.replace('@import url(https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap);',' ');
fs.writeFileSync('./node_modules/@syncfusion/ej2-base/styles/tailwind-dark.css',tailwindDarkCnt);console.log('Google roboto link has been removed from tailwind and tailwind-dark themes.');
Step 2: The following commands should be added to the scripts in the package.json file.
"postinstall": "node remove-external.js"
Step 3: Now run the “npm install” command to install the dependent package.
Every time while installing the packages the Google Roboto font link will be removed automatically from the tailwind and tailwind-dark theme CSS files.
Please let us know if you need further assistance.
Regards,
Gokul
This issue has been resolved and has not had any activity for 2 weeks. Closing for housekeeping purposes.