Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

How to use -p flag from node-js api? #61

Closed
sandwichsudo opened this issue Feb 22, 2016 · 1 comment
Closed

How to use -p flag from node-js api? #61

sandwichsudo opened this issue Feb 22, 2016 · 1 comment

Comments

@sandwichsudo
Copy link

Hi,
I have a script for my deployment which compiles modules for the entry points before running the webpack compiler. I would like to run the compiler with the -p flag using the node api (https://github.com/webpack/docs/wiki/node.js-api)
I can't see an option in the webpack config for this - is there one, or another way i can provide this argument to webpack?

Here is my script:

utils.runScript('node-scripts/generate-entries.jsx', ['--harmony'], (err) => {
    if (err) throw err;
    console.log('entries generated');
    const webpack = require('webpack');
    const webpackConfig = require('../webpack.config.js');
//want to add -p to this somehow
    webpack(webpackConfig, () => {
        console.log('deploy completed');
    });
});

Thanks,
Gilly

@sandwichsudo
Copy link
Author

Realised this is in the wrong place - posted question on stackoverflow
http://stackoverflow.com/questions/35550531/how-to-use-p-flag-in-webpack-from-node-js-api

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

No branches or pull requests

1 participant