Skip to content
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

Add options callback to Encore.enablePostCssLoader() #130

Merged
merged 1 commit into from Aug 5, 2017

Conversation

Lyrkan
Copy link
Collaborator

@Lyrkan Lyrkan commented Aug 4, 2017

This PR allows to add a callback as the first argument of Encore.enablePostCssLoader() in order to be able to modify the options of the postcss-loader.

As an example (fixes #129):

Encore.enablePostCssLoader((options) => {
    options.config = {
        path: 'app/config/postcss.config.js'
    };
});

@weaverryan
Copy link
Member

This looks perfect. Very nice work! Thank you @Lyrkan!

@weaverryan weaverryan merged commit 0999277 into symfony:master Aug 5, 2017
weaverryan added a commit that referenced this pull request Aug 5, 2017
…rkan)

This PR was merged into the master branch.

Discussion
----------

Add options callback to Encore.enablePostCssLoader()

This PR allows to add a callback as the first argument of `Encore.enablePostCssLoader()` in order to be able to modify the options of the `postcss-loader`.

As an example (fixes #129):

```js
Encore.enablePostCssLoader((options) => {
    options.config = {
        path: 'app/config/postcss.config.js'
    };
});
```

Commits
-------

0999277 Add options callback to Encore.enablePostCssLoader()
@Lyrkan Lyrkan deleted the add-postcss-loader-options branch August 5, 2017 21:21
weaverryan added a commit that referenced this pull request Aug 9, 2017
This PR was merged into the master branch.

Discussion
----------

Add options callback to Encore.enableLessLoader()

This PR allows to add a callback as the first argument of `Encore.enableLessLoader()` (fixes #118).
I didn't notice that one was missing too when working on #130.

Example :

```js
Encore.enableLessLoader((options) => {
    options.relativeUrls = false;
});
```

Commits
-------

fdf72da Add options callback to Encore.enableLessLoader()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: How to set a custom path to the postcss.config.js file?
2 participants