It's possible that the import path /src/*
is incorrect. If the file you are referencing is located within the src
folder, then the import path may be wrong. You should use a relative path to reference any .css files.
Regarding the js
imports, they need to be named. Since you are using TypeScript and import statements, it is necessary to either name the import or specify what exactly you are importing from the js
files. The import statement could look like this:
import fit from "/src/assets/js/*";
or
import { fit } from "/src/assets/js/*";
And in the custom.min.js
file, the export should be structured as follows:
export default fit;
or
export { fit };
When it comes to your .css
and .js
files, assuming your directory structure looks like this:
__src
|___ assets
|
|___ components
|
|
|___ App.tsx
|___ App.css
|___ ...(any other files in `src/` from a `create-react-app`)
You will need to import the .css
file into the App.tsx
like so:
import "./assets/style/style.css"
You can choose to omit the extension if you prefer, although I am not completely certain about doing so for .css
files.
I hope this information proves helpful!