Answer the question
In order to leave comments, you need to log in
Webpack: how to fix Module not found: Error: Can't resolve './src/base.scss'?
Hello! This is my first time trying to use sass. Setting up webpack:
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path=require('path');
module.exports={
entry:'./src/index.js',
output:{
filename:'bundle.js',
path:path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader']
})
}
]
},
plugins: [
new ExtractTextPlugin('style.css')
],
resolve: {
extensions: ['.js', '.scss']
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question