Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Error in module loaders #37

Closed
joaogarin opened this issue Feb 8, 2016 · 1 comment
Closed

Error in module loaders #37

joaogarin opened this issue Feb 8, 2016 · 1 comment

Comments

@joaogarin
Copy link

Hello,

I am trying to setup an app, everything seems to work okay but the loaders (namely the sass loader) is throwing some errors.

Error: Cannot find module '!css!sass!./css/_siteintro.scss'

In my webpack config in the common var I have my loaders :

var common = {
  resolve: {
    extensions: ['', '.ts', '.js', '.json'],
  },
  module: {
    loaders: [
      // Support for *.json files.
      {test: /\.json$/, loader: 'json'},

      // Support for CSS as raw text
      {test: /\.css$/, loader: 'raw'},

      //sass loader implementation
      {test: /\.scss$/, loaders: ["style", "css", "sass"]},

...

and in the ts file I am requiring the sass file :

var css = require("!css!sass!./css/_siteintro.scss");

Any idea what might be the issue?

@joaogarin
Copy link
Author

THis issue was completely unrelated to the repo itself. Was about the way I was loading the file
You should only do require("./css/_siteintro.scss"); without !css!sass! since its already in webpack config file.

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

No branches or pull requests

1 participant