Skip to content

Commit

Permalink
calypso-build: add webpack config for output.jsonpFunction (#46252)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder authored Oct 21, 2020
1 parent 7bf8123 commit cdc9683
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/calypso-build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ const cachePath = path.resolve( '.cache' );
* @param {object} env environment options
* @param {object} argv options map
* @param {object} argv.entry Entry point(s)
* @param {string} argv.'output-chunk-filename' Output chunk filename
* @param {string} argv.'output-path' Output path
* @param {string} argv.'output-filename' Output filename pattern
* @param {string} argv.'output-library-target' Output library target
* @param {string} argv.'output-jsonp-function' Output jsonp function
* @returns {object} webpack config
*/
function getWebpackConfig(
Expand All @@ -54,6 +56,7 @@ function getWebpackConfig(
'output-path': outputPath = path.join( process.cwd(), 'dist' ),
'output-filename': outputFilename = '[name].js',
'output-library-target': outputLibraryTarget = 'window',
'output-jsonp-function': outputJsonpFunction = 'webpackJsonp',
}
) {
const workerCount = 1;
Expand Down Expand Up @@ -88,6 +91,7 @@ function getWebpackConfig(
path: outputPath,
filename: outputFilename,
libraryTarget: outputLibraryTarget,
jsonpFunction: outputJsonpFunction,
},
optimization: {
minimize: ! isDevelopment,
Expand Down

0 comments on commit cdc9683

Please sign in to comment.