Semantic-UI-CSS icon indicating copy to clipboard operation
Semantic-UI-CSS copied to clipboard

Google font causes fatal error

Open nolawnchairs opened this issue 8 years ago • 2 comments

Hi,

As per the instructions, I import the CSS file in my index.tsx file:

import 'semantic-ui-css/semantic.min.css';

ReactDOM.render(<App />, document.getElementById('root'));

This error is thrown:

Uncaught SyntaxError: Invalid or unexpected token at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at u (file:///D:/Dev/CPII/ecpii/out/renderer.js:551:1092)

The line causing this is the line in the CSS file that imports the Google font: semantic.min.css:11

nolawnchairs avatar Oct 30 '17 04:10 nolawnchairs

I have made a fork for this issue : https://github.com/arthurlacoste/semantic-ui-offline

You can use this for the css with fonts included :

npm i semantic-ui-offline

arthurlacoste avatar Oct 31 '17 01:10 arthurlacoste

root cause is the same as https://github.com/Semantic-Org/Semantic-UI-CSS/issues/32

givanse avatar Dec 31 '18 22:12 givanse