Skip to content

Commit

Permalink
Stub create-interpolate-element
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Dec 1, 2020
1 parent 1b86883 commit 059b6be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/shared/element-to-php.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const createInterpolateElement = x => x;

export default createInterpolateElement;
6 changes: 6 additions & 0 deletions webpack.config.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ module.exports = [
/^@wordpress\/i18n$/,
path.join( __dirname, './extensions/shared/i18n-to-php' )
),
new webpack.NormalModuleReplacementPlugin(
/^\.\/create-interpolate-element$/,
path.join( __dirname, './extensions/shared/element-to-php' )
),
new StaticSiteGeneratorPlugin( {
// The following mocks are required to make `@wordpress/` npm imports work with server-side rendering.
// Hopefully, most of them can be dropped once https://github.com/WordPress/gutenberg/pull/16227 lands.
Expand All @@ -137,6 +141,7 @@ module.exports = [
document: {
addEventListener: _.noop,
createElement: _.noop,
documentElement: _.noop,
head: { appendChild: _.noop },
},
navigator: {},
Expand All @@ -153,6 +158,7 @@ module.exports = [
DOCUMENT_POSITION_PRECEDING: '',
DOCUMENT_POSITION_FOLLOWING: '',
},
removeEventListener: _.noop,
URL: {},
},
},
Expand Down

0 comments on commit 059b6be

Please sign in to comment.