Skip to content

Commit b7352f6

Browse files
authored
fix(build): bundle HTML files as inline assets (#23)
1 parent e8a1780 commit b7352f6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/react-scripts/config/webpack.config.bundle.umd.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ const commonConfig = webpackEnv => {
8080
});
8181
}
8282

83+
if (shouldProduceCompactBundle) {
84+
/**
85+
* We want HTML files to become part of the bundle.
86+
*/
87+
config.module.rules[oneOfRuleIndex].oneOf.unshift({
88+
test: /\.html$/,
89+
type: 'asset/inline',
90+
});
91+
}
92+
8393
/**
8494
* We want to have deterministic name for our CSS bundle.
8595
*/

0 commit comments

Comments
 (0)