Skip to content

Remove stylesheet entries from Encore config #961

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
Apr 4, 2019

Conversation

voronkovich
Copy link
Contributor

The documentation says:

Using addStyleEntry() is supported, but not recommended. A better option is to use follow the pattern above: use addEntry() to point to a JavaScript file, then require the CSS needed from inside of that.

With Encore, think of your app.js file like a standalone JavaScript application: it will require all of the dependencies it needs (e.g. jQuery or React), including any CSS.

See https://symfony.com/doc/current/frontend/encore/simple-example.html#compiling-only-a-css-file

@javiereguiluz
Copy link
Member

Much better indeed! Thanks Oleg!

@javiereguiluz javiereguiluz merged commit abfbd48 into symfony:master Apr 4, 2019
javiereguiluz added a commit that referenced this pull request Apr 4, 2019
This PR was merged into the master branch.

Discussion
----------

Remove stylesheet entries from Encore config

The documentation says:

> **Using addStyleEntry() is supported, but not recommended**. A better option is to use follow the pattern above: use addEntry() to point to a JavaScript file, then require the CSS needed from inside of that.

> With Encore, think of your app.js file like a standalone JavaScript application: it will require all of the dependencies it needs (e.g. jQuery or React), including any CSS.

See https://symfony.com/doc/current/frontend/encore/simple-example.html#compiling-only-a-css-file

Commits
-------

abfbd48 Remove stylesheet entries from Encore config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants