Skip to content

Commit 14aa992

Browse files
committed
feat: removes the need to fill in "app-config" script (it's already in the bundle)
1 parent 53c66a0 commit 14aa992

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

app-config-webpack/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,13 @@ export default class AppConfigPlugin {
7878
HtmlWebpackPlugin.getHooks(compilation).alterAssetTagGroups.tapPromise(
7979
'AppConfigPlugin',
8080
async ({ headTags, ...html }) => {
81-
const { fullConfig } = await loadValidatedConfig(
82-
this.loadingOptions,
83-
this.schemaLoadingOptions,
84-
);
85-
8681
// remove placeholder <script id="app-config"></script> if it exists
8782
const newTags = headTags.filter(({ attributes }) => attributes.id !== 'app-config');
8883

8984
newTags.push({
9085
tagName: 'script',
9186
attributes: { id: 'app-config', type: 'text/javascript' },
92-
innerHTML: `window._appConfig = ${JSON.stringify(fullConfig)}`,
87+
innerHTML: ``,
9388
voidTag: false,
9489
});
9590

0 commit comments

Comments
 (0)