Skip to content

Conversation

alOneh
Copy link
Contributor

@alOneh alOneh commented Jun 15, 2017

Encore does not support adding an extra plugin to the list of registered plugins.
In Symfony demo, we try to reduce the size of one of our entries and have to manually add the plugin to the config by doing this :

var config = Encore.getWebpackConfig();
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));

I propose to update the API of Encore through a new method addPlugin(plugin).

Encore
// ...
    .addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))

@weaverryan
Copy link
Member

Thank you Alain!

@weaverryan weaverryan merged commit dbe7ea2 into symfony:master Jun 20, 2017
weaverryan added a commit that referenced this pull request Jun 20, 2017
This PR was squashed before being merged into the master branch (closes #19).

Discussion
----------

Allow to add extra plugin

Encore does not support adding an extra plugin to the list of registered plugins.
In Symfony demo, we try to reduce the size of one of our entries and have to manually add the plugin to the config by doing this :

```js
var config = Encore.getWebpackConfig();
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
```

I propose to update the API of Encore through a new method `addPlugin(plugin)`.

```js
Encore
// ...
    .addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
```

Commits
-------

dbe7ea2 Merge branch 'master' into add-plugins
225a0da Allow to add extra plugin
@weaverryan
Copy link
Member

Docs issue: symfony/symfony-docs#8070

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.

2 participants