JohnAlbin / normalize-scss

This is the Sass version of Normalize.css, a collection of HTML element and attribute rulesets to normalize styles across all browsers.
https://github.com/JohnAlbin/normalize-scss#latest-versions
MIT License
1.44k stars 254 forks source link

Unable to bundle into CSS file using Webpack v2 #113

Closed wsfuller closed 1 year ago

wsfuller commented 7 years ago

Installed using the provided instructions within the README file but nothing gets bundled into my app.css

Tech:

yarn add normalize-scss

Webpack Config:

rules: [
  {
    test: /\.(s?)css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'resolve-url-loader', 'postcss-loader', 'sass-loader']
  })
},
...
plugins[
  new ExtractTextPlugin({
    filename: 'app.css',
allChunks: true
  })
]

index.scss:

@import 'normalize';
@include normalize();

Which returns an error @import 'normalize'; File to import not found or unreadable: normalize.

@import "../node_modules/normalize-scss/sass/normalize";
@include normalize();

Doesn't bundle anything into my app.css

Sanity check against hint.css

@import "../node_modules/hint.css/src/hint";

This bundles hint.css as expected but nothing for normalize.

What am I missing to get this modules to bundle correctly? Looking over Approach 2 and looks like I'm including the path, have newest version, including normalize(), and another dependency is bundling just fine.

JohnAlbin commented 7 years ago

If you've configured webpack correctly, then @include normalize(); will output the default CSS rulesets.

Unfortunately, I can't help with your webpack config.