Webpack Tutorial for Beginners #5 - CSS Loaders

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 36

  • @MuhammadSaaddev
    @MuhammadSaaddev 4 роки тому +4

    For those who are having problems in implementing it in 2020 and getting an exclamation mark error, use separate objects for style-loader and css-loader like following:
    {
    test: /\.css$/,
    loader: 'style-loader'
    },
    {
    test: /\.css$/,
    loader: 'css-loader'
    }

  • @DanVC
    @DanVC 8 років тому +1

    Thank you so much! I'm starting the development about how to load CSS inside React components, but I just discovered with this video. Thanks!

  • @Gamesforyourmind
    @Gamesforyourmind 6 років тому +6

    Funny how much sense a 7 min video can make after reading pages and pages of docs and not getting the simple questions answered.

  • @ankitkumar-ih8qo
    @ankitkumar-ih8qo 3 роки тому

    I want to load CSS in webpack using typescript. So, I have to CSS folder on ".ts" file or How can I import.?
    Please tell me asap
    Thank you

  • @GrounDweller
    @GrounDweller 7 років тому +1

    I'm getting this error when I tried to command out 'webpack' after 6:00
    Please help ninja!
    ERROR in ./src/css/introComponent.css
    Module build failed: TypeError: loaderUtils.getOptions is not a function
    at Object.module.exports.pitch (C:\Users\ASUS\Desktop\Webpack\webpack-playlist
    ode_mo
    dules\style-loader\index.js:10:26)
    @ ./src/script-1.js 4:0-35

    • @Qexia
      @Qexia 7 років тому +2

      For me I had to go to the file it specified and changed the getOptions() function to parseQuery() and it worked
      Hope this helps.

    • @jameswood3798
      @jameswood3798 7 років тому

      `npm install --save-dev loader-utils` solved the problem

  • @sayamqazi
    @sayamqazi 5 років тому

    why not use a monospace font in the editor? why???

  • @sinisavuksanovic7537
    @sinisavuksanovic7537 8 років тому +2

    Hey Shaun, great choise about the Atom, you can clearly seen it even on smaller screens.
    Will you consider React Native to teach?

    • @NetNinja
      @NetNinja  8 років тому +1

      Hey, yeah, will be doing a series on this in the future :)

  • @rw7799
    @rw7799 6 років тому

    can you use php if using node? or would a dev use js and say mongoDB.. ? do you go with one or the other or mix it up for backend tasks? thx

  • @shayanshahid9638
    @shayanshahid9638 6 років тому

    How to add CSS assets like background-image url with the css file in webpack4?

  • @ach85
    @ach85 8 років тому +1

    Great tutorials!
    What criteria do you use to select the text editor? I saw you using Brackets, Atom, etc.

    • @NetNinja
      @NetNinja  8 років тому +3

      Thanks :). I go for one with an active community --> a lot of people are using Atom and making decent packages to improve it. Plus, it looks nice :). I stopped using Brackets because it seemed a little dead in terms of updates and releases.

  • @hellonavneet
    @hellonavneet 7 років тому

    Thanks a lot for the video, it helped me use css and scss files in my webpack app.

  • @sspears_88
    @sspears_88 7 років тому

    Question - why didn't you exclude node_modules in the css loader portion of your webpack config? Does this only need to be specified once, or did you not add it because there wouldn't be any css files in the node_modules folder?

    • @JurajPecháč
      @JurajPecháč 7 років тому

      He is only excluding node_modules from being parsed with babel-loader (, but not from being bundled.) You must specify it for css-loader again.

  • @sayedakbarali5650
    @sayedakbarali5650 8 років тому +1

    thanks for new series

  • @3ab8aR
    @3ab8aR 8 років тому +4

    hey Shaun !
    will you make a MEAN stack app series ?

    • @NetNinja
      @NetNinja  8 років тому +6

      Hey - I will be doing this fairly soon, yeah :)

    • @3ab8aR
      @3ab8aR 8 років тому +3

      Can't wait.
      Thanks from Syria

  • @andrewolkhovsky5168
    @andrewolkhovsky5168 7 років тому

    Great lesson, thanks!

  • @thuongdoanvan9103
    @thuongdoanvan9103 6 років тому

    #help
    i'm getting error like this, Do you have any ideas????
    Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
    - configuration.module has an unknown property 'loaders'. These properties are valid:
    object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unkn
    ownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wr
    appedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
    -> Options affecting the normal modules (`NormalModuleFactory`).

    • @samuelpimenta1942
      @samuelpimenta1942 6 років тому

      Yeah. Some things have changed in the Webpack 4. (including the way to create config files) I will give my updated file below. I hope that helps!

  • @sharkdeng9253
    @sharkdeng9253 5 років тому

    Really helpful!

  • @Colstonewall
    @Colstonewall 8 років тому +1

    Awesome! Thanks!!

  • @tonyxu2705
    @tonyxu2705 5 років тому

    I am so so sorry that I messed up with your repo files in git. I was trying to install webpack and babel, I think I used "git audit --force".

  • @bpospanov
    @bpospanov Рік тому

    Great

  • @ctushr
    @ctushr 4 роки тому

    I think you should update this series.

  • @harshwardhankamble2498
    @harshwardhankamble2498 4 роки тому

    Cool

  • @Andrew-jq3lb
    @Andrew-jq3lb 7 років тому

    10x m8 you've saved me life! :)

  • @Thibka1
    @Thibka1 6 років тому

    You kinda sound like Korg from Thor Ragnarok :)

  • @shadmanmartinpiyal4057
    @shadmanmartinpiyal4057 4 роки тому

    in May, 2020, it works perfectly well, but,
    I did "npm install node-sass" and the order in the 'loader is the most important" so it will be,
    {
    test:/\.css$/,
    loader:'style-loader!css-loader'
    }
    thanks

  • @coolcat4805
    @coolcat4805 7 років тому +1

    f**k webpacks!!!