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

webpack.config exporter #162

Open
sigsegvat opened this issue Feb 20, 2017 · 1 comment
Open

webpack.config exporter #162

sigsegvat opened this issue Feb 20, 2017 · 1 comment

Comments

@sigsegvat
Copy link

sigsegvat commented Feb 20, 2017

hi!
I tried roc and it realy looks nice. Is there any way to get the webpack.config the project is effectively using?

something like roc webpack > webpack.config.js would be nice.

thanks!

@dlmr dlmr added the question label Feb 24, 2017
@dlmr
Copy link
Member

dlmr commented Feb 24, 2017

Hello!

We are planing to make this easier in the future, part of the documentation generation, but there is a solution right not that you can use.

// roc.config.js

module.exports = {
  project: {
    actions: [{
      hook: 'build-webpack',
      action: () => () => (webpackConfig) => {
        // Logs the Webpack configuration before the roc.config.webpack is applied.
        // If we want the configuration with the roc.config.webpack applied we need to do 
        // a little more work.
        console.log(JSON.stringify(webpackConfig, null, 2));
        return webpackConfig;
      }
    }]
  }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants