Recently, I created a new Vue app using TypeScript with Vue Cli 3.
However, when attempting to import CSS or Sass into my TypeScript file, I encountered the following issue:
import * as sassStyles from '@/assets/sass/my.module.scss';
This resulted in the error message:
Cannot find module
While searching for a solution, I came across an article on How to use CSS Modules with TypeScript and webpack, but I'm unsure how to implement it in Vue Cli 3, which abstracts away the webpack configuration.
Does anyone have any suggestions on what to add to the vue.config.js file in order to directly import CSS and Sass files into the block?
I've read that using typings-for-css-modules-loader
instead of css-loader
may be necessary.