UNPKG

flamingo-carotene-webpack

Version:

Provide an abstraction for webpack with the ability for other modules to extend the webpack config, with integration into the flamingo-carotene-dev-server module

21 lines (14 loc) 498 B
const webpackBuildHandler = require('../build') const webpackExportConfig = function (core) { const config = core.getConfig() const fs = require('fs') const serialize = require('serialize-javascript'); const data = serialize(config.webpackConfig, { 'ignoreFunction': true, 'space': 2, 'unsafe': true }); fs.writeFileSync('webpack.config.js', data); core.getCliTools().info(`Webpack Config was exported to ./webpack.config.js`) } module.exports = webpackExportConfig