Skip to content

Commit 6eadb21

Browse files
mwczgithub-actions[bot]kylebuch8
authored
fix: umd.min modules now import umd.min builds of PFE dependencies (#1168)
* fix: umd.min modules now import umd.min builds of PFE dependencies * updating changelog Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kyle Buchanan <[email protected]>
1 parent e3cc73b commit 6eadb21

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG-1.x.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
- [b32b41c](https://github.com/patternfly/patternfly-elements/commit/b32b41c2071eb59c5fc17b6c233783cacea59b92) fix: pfe-accordion adding right border and shadow back (#1184)
1212
- [47a1f4f](https://github.com/patternfly/patternfly-elements/commit/47a1f4fe9365f9366974fe67a30b48cc91e4e6a8) fix: unwanted padding on pfe-accordion (#1083)
1313
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: pfe-tabs vertical display on mobile
14+
- []() fix: umd.min modules now import umd.min builds of PFE dependencies (#1168)

scripts/gulpfile.factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ ${fs
296296
return src(`${elementName}*.js`, {
297297
cwd: paths.temp
298298
})
299-
.pipe(replace(/^(import .*?)(['"]\.\.\/\.\.\/(?!\.\.\/).*)\.js(['"];)$/gm, "$1$2.umd$3"))
299+
.pipe(replace(/^(import .*?)(['"]\.\.\/\.\.\/(?!\.\.\/).*)\.js(['"];)$/gm, "$1$2$3"))
300300
.pipe(
301301
rename({
302302
suffix: ".umd"

scripts/rollup.config.factory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import replace from "rollup-plugin-re";
77
import { readdirSync } from "fs";
88
import { get } from "lodash";
99

10-
const importRegex = /^(import .*?)(['"]\.\.\/\.\.\/(?!\.\.\/).*)\.js(['"];)$/gm;
10+
const importRegex = /^(import .*?)(['"]\.\.\/\.\.\/(?!\.\.\/).*?)(\.js)?(['"];)$/gm;
1111

1212
/**
1313
* This function map moduleIds to global variable names. This is used when the
@@ -80,7 +80,7 @@ function umdConfig({ elementName, className } = {}) {
8080
patterns: [
8181
{
8282
test: importRegex,
83-
replace: "$1$2.umd$3"
83+
replace: "$1$2.umd$4"
8484
}
8585
]
8686
}),
@@ -105,7 +105,7 @@ function esmMinConfig({ elementName, className } = {}) {
105105
patterns: [
106106
{
107107
test: importRegex,
108-
replace: "$1$2.min.js$3"
108+
replace: "$1$2.min.js$4"
109109
}
110110
]
111111
}),
@@ -136,7 +136,7 @@ function umdMinConfig({ elementName, className } = {}) {
136136
patterns: [
137137
{
138138
test: importRegex,
139-
replace: "$1$2.umd.min$3"
139+
replace: "$1$2.umd.min$4"
140140
// ".js" is not included here to maintain compability with the AMD
141141
// module format, see umdConfig above for more info.
142142
}

0 commit comments

Comments
 (0)