Open caiulucas opened 2 years ago
I found out that the svg imports was not working:
What I did was change the rules.webpack.js file adding in file-loader plugin another file type (svg):
{ test: /\.(png|jpe?g|gif|svg)$/i, loader: 'file-loader', options: { name: '[path][name].[ext]', }, }
Then, in src/@types/image.d.ts I added a new declaration:
src/@types/image.d.ts
declare module '*.png'; declare module '*.jpeg'; declare module '*.jpg'; declare module '*.gif'; // New declaration declare module '*.svg';
And now we can import svg files directly in code :)
The problem:
I found out that the svg imports was not working:
The solution
What I did was change the rules.webpack.js file adding in file-loader plugin another file type (svg):
Then, in
src/@types/image.d.ts
I added a new declaration:And now we can import svg files directly in code :)