Skip to content

[Encore] Update enableSassLoader for node-sass options #8108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/encore/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ this, you can use the ``resolve_url_loader`` option:

// webpack.config.js
Encore
+ .enableSassLoader({
+ .enableSassLoader(function(sassOptions) {}, {
+ resolve_url_loader: false
+ })
;
Expand Down
16 changes: 15 additions & 1 deletion frontend/encore/css-preprocessors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,21 @@ And enable it in ``webpack.config.js``:
.enableSassLoader()
;

That's it! All files ending in ``.sass`` or ``.scss`` will be pre-processed.
That's it! All files ending in ``.sass`` or ``.scss`` will be pre-processed. You
can also pass options to ``sass-loader``:

.. code-block:: javascript

// webpack.config.js
// ...

Encore
// ...
.enableSassLoader(function(sassOptions) {
// https://github.com/sass/node-sass#options
// options.includePaths = [...]
});
;

Using LESS
----------
Expand Down