Skip to content

Uncaught Error: Cannot find module "./main.scss" #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
krishnasaga opened this issue Aug 15, 2016 · 0 comments
Closed

Uncaught Error: Cannot find module "./main.scss" #318

krishnasaga opened this issue Aug 15, 2016 · 0 comments

Comments

@krishnasaga
Copy link

krishnasaga commented Aug 15, 2016

I'm not getting any error in npm console but in browser console I'm getting Uncaught Error: Cannot find module "./main.scss"

It working well if I do import '!style!css!sass!./main.scss' but getting this error when I do import './main.scss

webpack.config.js

`var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var webpack = require('webpack');

module.exports = {
  entry: './src/index.js',
  output: {
path: './bin',
filename: 'bundle.js'
},
  module: {
    loaders: [
{
test: /.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
},
{
test: /.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'file?name=public/fonts/[name].[ext]'
},
{
test: /.scss$/,
loaders: ['style','css','sass']
}
]
  },
plugins: [new HtmlWebpackPlugin(
{
filename: './index.html',
template: require('html-webpack-template'),
appMountId: 'app',
}
)]
,
sassLoader: {
includePaths: [
path.resolve(__dirname, "./node_modules/materialize-sass/sass/")
]
}
};`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant