Skip to content

Commit 37ef3fe

Browse files
committed
minor #867 adding docs related to disabling the css extraction and the dev-server (weaverryan)
This PR was merged into the main branch. Discussion ---------- adding docs related to disabling the css extraction and the dev-server Extra docs for #756 Commits ------- bff8f04 adding docs related to disabling the css extraction and the dev-server
2 parents 5bd9152 + bff8f04 commit 37ef3fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

+8
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,14 @@ class Encore {
13251325
* into a .css file. All your styles will then be injected
13261326
* into the page by your JS code.
13271327
*
1328+
* This can be useful when using the dev-server with hot
1329+
* module reload (so that CSS can benefit from HMR):
1330+
*
1331+
* ```
1332+
* // disable CSS only when using the dev-server
1333+
* Encore.disableCssExtraction(Encore.isDevServer())
1334+
* ```
1335+
*
13281336
* Internally, this disables the mini-css-extract-plugin
13291337
* and uses the style-loader instead.
13301338
* @param {boolean} disabled

0 commit comments

Comments
 (0)