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

use es2015 syntax for webpack configs #195

Conversation

domasx2
Copy link
Contributor

@domasx2 domasx2 commented Apr 7, 2016

Hi!

I think webpack configs are nicer to manage and read if spread operator is used to extend them.

//instead of
const config = Object.create(baseConfig);
config.entry = ['another_entrypoint.js'];
config.plugins.push(new SomePlugin()};
module.exports = config;

//use this
export default {
   ...baseConfig,
   entry: ['another_entrypoint.js'],
   plugins: [...baseConfig.plugins, new SomePlugin()]
};

This is easy to add too since babel is already in the project.

This PR:

  • babel-node used to run webpack, instead of node
  • webpack configs rewritten using es2015/es2017 syntax

@chentsulin chentsulin merged commit 6d7797f into electron-react-boilerplate:master Apr 10, 2016
@chentsulin
Copy link
Member

Thanks!

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.

None yet

2 participants