-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from ampersarnie/hotfix/swap-minification
Change webpack config from native minification to use TerserPlugin.
- Loading branch information
Showing
4 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
36 changes: 23 additions & 13 deletions
36
example-site/plugins/test-plugin/src/components/DisplayComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
import SVGAsComponent from '@Static/logo.svg'; | ||
import SVGAsURL from '@Static/svg-file.svg?url'; | ||
import MailIconPNG from '@Static/mail-icon.png'; | ||
import { __, _n, sprintf } from '@wordpress/i18n'; | ||
|
||
import TestComponent from './TestComponent'; | ||
|
||
/** | ||
* Display Component for an example block. | ||
*/ | ||
export default (): JSX.Element => ( | ||
<> | ||
<div className="logo"> | ||
<SVGAsComponent /> | ||
<img src={SVGAsURL} alt="Reference and SVG as the url" /> | ||
</div> | ||
<div>Example Block</div> | ||
<TestComponent additionalValue="This is not hidden" /> | ||
<div> | ||
<img src={MailIconPNG} alt="PNG Mail Icon for testing usage." /> | ||
</div> | ||
</> | ||
); | ||
export default ({ attributes: { itemCount = 2 } }): JSX.Element => { | ||
// General comment. | ||
// translators: This is some basic alt-text. | ||
const svgAlt = __("Reference and SVG as the url", 'test-translation'); | ||
|
||
// translators: %d is the number of items chosen. | ||
const translatedValue = sprintf(_n("%d item", "%d items", itemCount, 'test-translation'), itemCount); | ||
|
||
return ( | ||
<> | ||
<div className="logo"> | ||
<SVGAsComponent /> | ||
<img src={SVGAsURL} alt={svgAlt} /> | ||
</div> | ||
<div>Example Block</div> | ||
<TestComponent additionalValue={translatedValue} /> | ||
<div> | ||
<img src={MailIconPNG} alt="PNG Mail Icon for testing usage." /> | ||
</div> | ||
</> | ||
); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@bigbite/build-tools", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "Provides configuration for the Big Bite Build Tools.", | ||
"author": "Paul Taylor <[email protected]> (https://github.com/ampersarnie)", | ||
"engines": { | ||
|
@@ -90,6 +90,7 @@ | |
"stylelint-webpack-plugin": "^4.1.1", | ||
"svg-sprite-loader": "^6.0.9", | ||
"terminal-kit": "^2.1.8", | ||
"terser-webpack-plugin": "^5.3.10", | ||
"ts-loader": "^9.4.2", | ||
"typescript": "^5.0.4", | ||
"url-loader": "^4.1.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters