Code Monkey home page Code Monkey logo

Comments (4)

radziksh avatar radziksh commented on September 2, 2024

I think you should configure webpack.config.js, something like:

module.exports = {
...
module: {
loaders: [
{
test: /.scss$/,
loaders: ["style", "css", "sass"]
}
]
}
};

https://github.com/jtangelder/sass-loader

from react-calendar-timeline.

mariusandra avatar mariusandra commented on September 2, 2024

Hi, indeed even though you have "sass-loader" in your package.json, it appears your webpack is not configured to handle .scss files.

Closing this for now, feel free to reopen if there's a bug.

from react-calendar-timeline.

nandito avatar nandito commented on September 2, 2024

I have the same issue, I tried with many webpack configs, css/sass loaders but nothing helped.
If I comment out the require('./Timeline.scss'); in the Timeline.js, and import the that scss manually in my webpack's stylesheet entry file, it works.

My webpack config (which works properly on each node_modules, except react-calendar-timeline):

{
  name: "javascript",
  ...    
  module: {
      loaders: [
        {
          test: /\.jsx?$/,
          loaders: ['babel'],
          include: path.join(__dirname, './frontend')
        }
      ]
    }
    ...
} , {
  name: "stylesheet",
  ...
  module: {
      loaders: [
        {
          test: /\.s?css$/,
          loader: ExtractTextPlugin.extract( "css-loader!postcss-loader!sass-loader" )
        },
        {
          test: /\.s?css$/,
          include: /node_modules/,
          loaders: ['style-loader','css-loader', 'sass-loader']
        }
      ]
    }
}

So I have 2 webpack 'job' and in this case the 'javascript' bundler task tried to handle the Timeline.js's require('./Timeline.scss'); but failed. After I added the style loader to the javascript part as well, everything worked fine (without touching the original Timeline.js and including styles manually).

from react-calendar-timeline.

jmerriweather avatar jmerriweather commented on September 2, 2024

I use Brunch and get the following:

Cannot find module 'react-calendar-timeline/modules/lib/Timeline.scss' from 'react-calendar-timeline/modules/lib/Timeline.js'

from react-calendar-timeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.