Skip to content

can't import index.scss #133

Closed
Closed
@ablbol

Description

@ablbol

I created a new react project using create-react-app and installed react-redux-toastr following all instructions. The toastr works fine if I use but not when I try to import.
I tried this line (with and without the ~) in my index.scss

@import '~react-redux-toastr/src/styles/index.scss';

I tried this line from my index.js:

import 'react-redux-toastr/src/styles/index.scss';

nothing seems to be working. Here is my package.json:

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap": "4.0.0-alpha.6",
    "classnames": "^2.2.5",
    "prop-types": "^15.5.4",
    "react": "^15.4.2",
    "react-apollo": "^1.0.0",
    "react-dom": "^15.4.2",
    "react-geosuggest": "^2.1.0",
    "react-helmet": "^5.0.3",
    "react-infinite-scroller": "^1.0.11",
    "react-redux": "^5.0.3",
    "react-redux-toastr": "^6.2.6",
    "react-router-dom": "^4.0.0",
    "react-transition-group": "^1.1.3",
    "reactstrap": "^4.5.0",
    "redux": "^3.6.0",
    "redux-form": "^6.6.1",
    "shortid": "^2.2.8"
  },
  "devDependencies": {
    "node-sass-chokidar": "^0.0.1",
    "npm-run-all": "^4.0.2",
    "react-scripts": "^1.0.6"
  },
  "scripts": {
    "build-css": "node-sass-chokidar src/styles -o src/styles",
    "watch-css": "npm run build-css && node-sass-chokidar src/styles -o src/styles --watch --recursive",
    "start-js": "yarn react-scripts start",
    "start": "npm-run-all -p watch-css start-js",
    "build": "npm run build-css && react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"

  },
  "main": "index.js",
  "license": "MIT",
  "proxy": "http://localhost:3001/"
}

Could you please point me in the right direction.
Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions