Skip to content

Webpack build process is overridding wp.utils #1569

Description

@ryanwelcher

I was working on #1557 and noticed that even though word-count.js was added as a dependency, it was not available at window.wp.utils. The entire object is being overridden by the following portion of webpack.config.js

const entryPointNames = [
	'element',
	'i18n',
	'components',
	'utils',
	'blocks',
	'date',
	'editor',
]


entryPointNames.forEach( entryPointName => {
	externals[ entryPointName ] = {
		'this': [ 'wp', entryPointName ],
	};
} );

Essentially, any items in entryPointNames will be added to thewp object and override anything already exisiting with the same name.

Can we namespace this to wp-gb or something similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions