Skip to main content
1 of 2
TyForHelpDude
  • 535
  • 1
  • 14
  • 28

load local css file in SPFx webpart

this is the html file contains referecence to local css files in same directory.

demo.html

 <title>Demo Template</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/swiper.css">
</head>
<body>
<div id="simplecontainer">

Now I created a SPFx web part(with reactJs) and contains same html element, so I need to load these css files.. how can I make this works as it in the html page above.

if they were small, I can copy and paste all into "myweppart.module.scss" ? but its not efficient I think

TyForHelpDude
  • 535
  • 1
  • 14
  • 28