Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-hot-loader

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-hot-loader - npm Package Compare versions

Comparing version 1.1.0-beta2 to 1.1.0-beta3

.npmignore

4

History.md

@@ -0,1 +1,5 @@

### 1.1.0 / 2017-05-14
- Add option fileMap, fix [#3](https://github.com/shepherdwind/css-hot-loader/issues/3)
### 1.0.3 / 2017-05-05

@@ -2,0 +6,0 @@

5

hotModuleReplacement.js

@@ -0,1 +1,3 @@

var normalizeUrl = require('normalize-url');
var getCurrentScriptUrl = function() {

@@ -20,3 +22,3 @@ var src;

var reg = new RegExp(filename + '\\.js$', 'g')
return src.replace(reg, mapRule.replace(/{fileName}/g, filename) + '.css');
return normalizeUrl(src.replace(reg, mapRule.replace(/{fileName}/g, filename) + '.css'));
});

@@ -42,2 +44,3 @@ };

function getReloadUrl(href, src) {
href = normalizeUrl(href);
var ret;

@@ -44,0 +47,0 @@ src.some(function(url) {

{
"name": "css-hot-loader",
"version": "1.1.0-beta2",
"version": "1.1.0-beta3",
"description": "css hot reload work with extract-text-webpack-plugin",

@@ -18,4 +18,5 @@ "main": "index.js",

"dependencies": {
"loader-utils": "^1.1.0"
"loader-utils": "^1.1.0",
"normalize-url": "^1.9.1"
}
}

@@ -68,2 +68,18 @@ ### CSS Hot Loader

### options
#### fileMap
Option to define you css file reload rule.
For example `'css-hot-loader?fileMap='../css/{fileName}'` , which mean
```
js/foo.js => css/foo.css
```
Default value is `{fileName}`.
see [#3](https://github.com/shepherdwind/css-hot-loader/issues/3).
### How

@@ -70,0 +86,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc