Skip to content

Fixed documentation for Webpack output.library and libraryTarget: 'wi…#212

Merged
shellscape merged 1 commit intoshellscape:masterfrom
zauan:master
Mar 13, 2021
Merged

Fixed documentation for Webpack output.library and libraryTarget: 'wi…#212
shellscape merged 1 commit intoshellscape:masterfrom
zauan:master

Conversation

@zauan
Copy link
Contributor

@zauan zauan commented Feb 22, 2021

…ndow'

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

Please Describe Your Changes

When building a library that exposes the main file exports to a variable ( for example window ) and use a multi entry config, only the last item in the entry array will be exposed. The example that was provided by the plugin would expose the webpack plugin serve client in the end file and it breaks the app.

An example of such configuration is:

// webpack.config.js
				output: {
					filename: `js/app.js`,
					library: ['zb', 'app'],
					libraryTarget: 'window'
				}

…ndow'

When building a library and use a multi entry config, only the last item in the entry array will be exposed. The example that was provided by the plugin would expose the webpack plugin serve client in the end file and it breaks the app
@shellscape shellscape merged commit 9fbe97b into shellscape:master Mar 13, 2021
@shellscape
Copy link
Owner

thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants