You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,7 @@ Styles are not added on `import/require()`, but instead on call to `use`/`ref`.
134
134
135
135
|Name|Type|Default|Description|
136
136
|:--:|:--:|:-----:|:----------|
137
+
|**`hmr`**|`{Boolean}`|`true`|Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added (good for non local development/production)|
137
138
|**`base`**|`{Number}`|`true`|Set module ID base (DLLPlugin)|
138
139
|**`attrs`**|`{Object}`|`{}`|Add custom attrs to `<style></style>`|
139
140
|**`transform`**|`{Function}`|`false`|Transform/Conditionally load CSS by passing a transform/condition function|
@@ -142,6 +143,21 @@ Styles are not added on `import/require()`, but instead on call to `use`/`ref`.
|**`convertToAbsoluteUrls`**|`{Boolean}`|`false`|Converts relative URLs to absolute urls, when source maps are enabled|
144
145
146
+
### `hmr`
147
+
148
+
Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added.
149
+
This could be used for non local development and production.
150
+
151
+
**webpack.config.js**
152
+
```js
153
+
{
154
+
loader:'style-loader'
155
+
options: {
156
+
hmr:false
157
+
}
158
+
}
159
+
```
160
+
145
161
### `base`
146
162
147
163
This setting is primarily used as a workaround for [css clashes](https://github.com/webpack-contrib/style-loader/issues/163) when using one or more [DllPlugin](https://robertknight.github.io/posts/webpack-dll-plugins/)'s. `base` allows you to prevent either the *app*'s css (or *DllPlugin2*'s css) from overwriting *DllPlugin1*'s css by specifying a css module id base which is greater than the range used by *DllPlugin1* e.g.:
0 commit comments