I am facing an issue while attempting to set up css modules with react and snowpack. Below are the steps to reproduce the problem:
"snowpack": "^2.17.0",
"@snowpack/plugin-sass": "^1.1.1",
Start by creating a new app using npx
npx create-snowpack-app snowpack --template @snowpack/app-template-react-typescript
npm install @snowpack/plugin-sass --save-dev
Add a sass file
app.sass
.test
width: 30px
height: 30px
background: red
App.tsx
import styles from './app.sass'
<div className={styles.test}/>
Snowpack devOptions
port: 8005,
open: 'none',
bundle: false,
out: 'dist'
Snowpack plugins
'@snowpack/plugin-react-refresh',
'@snowpack/plugin-dotenv',
'@snowpack/plugin-typescript',
'@snowpack/plugin-webpack',
'@snowpack/plugin-sass',
Run snowpack dev
npm start => snowpack dev
Error
SyntaxError: The requested module './app.css.proxy.js' does not provide an export named 'default'