Skip to content

htmlWebpackPluginAlterAssetTags is undefined #91

@eolme

Description

@eolme

I can't figure out what's wrong, but I have an error:

htmlWebpackPluginAlterAssetTags is undefined

here:

compiler.hooks.compilation.tap(plugin_name_1.PLUGIN_NAME, (compilation) => {
    if (compilation.name) {
        return;
    }
    compilation.hooks.htmlWebpackPluginAlterAssetTags.tapPromise(`${plugin_name_1.PLUGIN_NAME} add safari nomodule fix tags`, (htmlPluginData) => __awaiter(this, void 0, void 0, function* () {
        const element = this.inject === babel_multi_target_options_1.SafariNoModuleFixInject.body ? htmlPluginData.body : htmlPluginData.head;
        element.unshift(this.createSafariNoModuleFixTag());
        return htmlPluginData;
    }));
});

Trace:

TypeError: Cannot read property 'tapPromise' of undefined
    at C:\Repo\org\test\node_modules\@mntm\scripts\node_modules\webpack-babel-multi-target-plugin\dist\src\safari-nomodule-fix\safari.nomodule.fix.plugin.js:107:63
    at SyncHook.eval [as call] (eval at create (C:\Repo\org\test\node_modules\@mntm\scripts\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:99:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions