All Projects β†’ sheerun β†’ Extracted Loader

sheerun / Extracted Loader

It reloads extracted stylesheets extracted with ExtractTextPlugin

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Extracted Loader

Angular Hmr
πŸ”₯ Angular Hot Module Replacement for Hot Module Reloading
Stars: ✭ 490 (+631.34%)
Mutual labels:  webpack, hot-reload, loader
Node Hot Loader
Hot module replacement (hot reload) for Node.js applications. Develop without server restarting.
Stars: ✭ 111 (+65.67%)
Mutual labels:  webpack, hot-reload, loader
Sass Vars Loader
Use Sass variables defined in Webpack config or in external Javascript or JSON files
Stars: ✭ 112 (+67.16%)
Mutual labels:  webpack, hot-reload, loader
Angular Electron
Ultra-fast bootstrapping with Angular and Electron (Typescript + SASS + Hot Reload) 🚀
Stars: ✭ 4,914 (+7234.33%)
Mutual labels:  webpack, hot-reload
Webpack Pwa Manifest
Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
Stars: ✭ 447 (+567.16%)
Mutual labels:  webpack, hot-reload
Babel Loader
πŸ“¦ Babel loader for webpack
Stars: ✭ 4,570 (+6720.9%)
Mutual labels:  webpack, loader
Sass Loader
Compiles Sass to CSS
Stars: ✭ 3,718 (+5449.25%)
Mutual labels:  webpack, loader
Wasm Loader
✨ WASM webpack loader
Stars: ✭ 604 (+801.49%)
Mutual labels:  webpack, loader
Vue Loader
πŸ“¦ Webpack loader for Vue.js components
Stars: ✭ 4,778 (+7031.34%)
Mutual labels:  webpack, hot-reload
Stylefmt Loader
Webpack-loader. Fixes stylelint issues automatically while bundling with Webpack.
Stars: ✭ 24 (-64.18%)
Mutual labels:  webpack, loader
Thread Loader
Runs the following loaders in a worker pool
Stars: ✭ 945 (+1310.45%)
Mutual labels:  webpack, loader
Fuse Box
A blazing fast js bundler/loader with a comprehensive API πŸ”₯
Stars: ✭ 4,055 (+5952.24%)
Mutual labels:  hot-reload, loader
Phaser Ce Npm Webpack Typescript Starter Project
Project to get you started with your Phaser-CE (using the npm module) game using Typescript and Webpack for building! No hassle asset management, Google Web Font loader, live server, development vs distribution build pipeline, Electron packaging for desktop builds, and more...
Stars: ✭ 414 (+517.91%)
Mutual labels:  webpack, loader
Webpack Dev Server
Serves a webpack app. Updates the browser on changes. Documentation https://webpack.js.org/configuration/dev-server/.
Stars: ✭ 7,250 (+10720.9%)
Mutual labels:  webpack, hot-reload
Svgr
Transform SVGs into React components 🦁
Stars: ✭ 8,263 (+12232.84%)
Mutual labels:  webpack, loader
Css Loader
CSS Loader
Stars: ✭ 4,067 (+5970.15%)
Mutual labels:  webpack, loader
React Imported Component
βœ‚οΈπŸ“¦Bundler-independent solution for SSR-friendly code-splitting
Stars: ✭ 525 (+683.58%)
Mutual labels:  webpack, loader
Node Native Ext Loader
Loader for Node native extensions
Stars: ✭ 51 (-23.88%)
Mutual labels:  webpack, loader
Markdown Loader
markdown loader for webpack
Stars: ✭ 335 (+400%)
Mutual labels:  webpack, loader
Vueniverse
Full stack, user based, PWA, Vue template.
Stars: ✭ 339 (+405.97%)
Mutual labels:  webpack, hot-reload

extracted-loader

It hotreloads extracted stylesheets extracted with ExtractTextPlugin.

No configuration needed. A better css-hot-loader.

Use case

You want to hot reload only stylesheets, not the whole page. Great for editing dynamic views.

Installation

npm install extracted-loader --save-dev

or

yarn add extracted-loader --dev 

And then you can use it for example as so:

const isDev = process.env.NODE_ENV === 'development'

config.module.rules.push({
  test: /\.css$/,
  use: ['extracted-loader'].concat(ExtractTextPlugin.extract({
    filename: isDev ? "[name].css" : "[name].[contenthash].css",
    /* Your configuration here */
  }))
})

config.plugins.push(new ExtractTextPlugin('index.css'))

For hot reloading to work it is important to not use [contenthash] in development configuration.

Example use with sass

config.module.rules.push({
  test: /\.(sa|sc|c)ss$/,
  use: ['extracted-loader'].concat(ExtractTextPlugin.extract({
    use: [
      "babel-loader",
      {
        loader: 'css-loader',
        options: {
          url: true,
          minimize: !isDev,
          sourceMap: isDev,
          importLoaders: 2
        }
      },
      {
        loader: 'postcss-loader',
        options: {
          sourceMap: isDev,
          plugins: [
            require('autoprefixer')({
              /* options */
            })
          ]
        }
      },
      {
        loader: 'sass-loader',
        options: {
          sourceMap: isDev
        }
      }
    ]
  }))
})

config.plugins.push(new ExtractTextPlugin('index.css'))

How it works

By reloading all relevant <link rel="stylesheet"> when extracted text changes.

How to use with...

Contributing

Yes, please

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].