Recently, I decided to try using webpack to compile my scss files for the first time. However, when attempting to start it, I encountered an error message stating:
Field 'browser' doesn't contain a valid alias configuration
In addition, another error popped up saying:
Module not Found: Error: Can't resolve './src'
To make matters worse, a red text displayed my file directory with /index doesn't exist
(.js / .json / .wasm). Below is a snippet of my current webpack.config.js
configuration:
module.exports = [{
entry: 'mat-design.scss',
output: {
filename: 'style-bundle.js',
},
module: {
rules: [
{
test: /\.scss$/,
use: [
{
loader: 'file-loader',
options: {
name: 'styles.scss',
},
},
{ loader: 'extract-loader' },
{ loader: 'css-loader' },
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
mode: development,
webpackImporter: false,
},
},
]
}
]
},
}];
Would appreciate any assistance in resolving these issues.