Giter Club home page Giter Club logo

Comments (6)

kitze avatar kitze commented on August 27, 2024

This should be only happening in development mode, in production mode when using npm run build the compiled css should be in an extra file because ExtractTextPlugin.extract is configured.

from custom-react-scripts.

jbach avatar jbach commented on August 27, 2024

I’ve added a reduced testcase to https://github.com/jbach/custom-react-scripts-sass. Try running npm run build, the css will not be extracted. Am I doing something wrong? Maybe I’m confused, but looking at config/customizers.js, I don’t see ExtractTextPlugin.extract.

When I manually change the sass-loader in config/customizers.jsto

'SASS': {
    toArray: 'loaders',
    get: function () {
      return {
        test: /\.scss$/,
        loader: ExtractTextPlugin.extract('style', "css!postcss!sass")
      }
    }
  }

a separate CSS file is built.

from custom-react-scripts.

kitze avatar kitze commented on August 27, 2024

Just released 0.0.14 with a better fix for this. Now each customizer has a getDev and getProd functions. Should be ok now.

from custom-react-scripts.

jbach avatar jbach commented on August 27, 2024

Thank you for the fix, but can you confirm 0.0.14 is installable via npm? Installation via npm i custom-react-scripts fails for me with Node 6.6.0 / npm 3.10.3. See my full npm-debug.log

npm ERR! Path must be a string. Received undefined

from custom-react-scripts.

kitze avatar kitze commented on August 27, 2024

Yes. I got the same error with Node v6.6.0. I also see other people [have this issue]with different npm packages (webpack/webpack#2463) but I have no idea why.

Installing the scripts with Node v.6.2.0 worked completely fine for me. Please try it and let me know.

from custom-react-scripts.

jbach avatar jbach commented on August 27, 2024

I’ll close this issue. The nonrelated install bug is described in #13

from custom-react-scripts.

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.