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

calypso-build: add webpack config for output.jsonpFunction #46252

Merged
merged 5 commits into from
Oct 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/calypso-build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add a line to the docblock comment few lines above? The existing documentation there is not terribly helpful though 🙁 (output-path sets output path and output-library-target sets output library target, who would have guessed that)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Done in b42eaaa

}
) {
const workerCount = 1;
Expand Down Expand Up @@ -88,6 +89,7 @@ function getWebpackConfig(
path: outputPath,
filename: outputFilename,
libraryTarget: outputLibraryTarget,
jsonpFunction: outputJsonpFunction,
},
optimization: {
minimize: ! isDevelopment,
Expand Down