Skip to content

Latest webpack update breaks this plugin #404

Description

@ehuelsmann

The latest webpack upgrade seems to break this plugin (see ledgersmb/LedgerSMB#9769). The backtrace suggests a problem in the plugin:

ERROR in ./bootstrap.js
Module parse failed: Cannot use 'in' operator to search for 'start' in undefined
File was parsed as module type 'javascript/auto'.
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
TypeError: Cannot use 'in' operator to search for 'start' in undefined
    at set loc (/srv/ledgersmb/UI/node_modules/webpack/lib/Dependency.js:195:15)
    at DojoAMDDefineDependencyParserPlugin.processItem (/srv/ledgersmb/UI/node_modules/dojo-webpack-plugin/lib/DojoAMDDependencyParserMixin.js:112:12)
    at /srv/ledgersmb/UI/node_modules/dojo-webpack-plugin/lib/DojoAMDDependencyParserMixin.js:38:10
    at Array.forEach (<anonymous>)
    at DojoAMDDefineDependencyParserPlugin.processArray (/srv/ledgersmb/UI/node_modules/dojo-webpack-plugin/lib/DojoAMDDependencyParserMixin.js:32:16)
    at DojoAMDDefineDependencyParserPlugin.processCallDefine (/srv/ledgersmb/UI/node_modules/webpack/lib/dependencies/AMDDefineDependencyParserPlugin.js:374:24)
    at DojoAMDDefineDependencyParserPlugin.processCallDefine (/srv/ledgersmb/UI/node_modules/dojo-webpack-plugin/lib/DojoAMDDefineDependencyParserPlugin.js:47:20)
    at Hook.eval [as call] (eval at create (/srv/ledgersmb/UI/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
    at Hook.CALL_DELEGATE [as _call] (/srv/ledgersmb/UI/node_modules/tapable/lib/Hook.js:16:14)
    at JavascriptParser._callHooksForInfo (/srv/ledgersmb/UI/node_modules/webpack/lib/javascript/JavascriptParser.js:4766:24)

webpack compiled with 1 error

The content of ./bootstrap.js is generated as:

    // Compile bootstrap module as a virtual one
    const VirtualModulesPluginOptions = {
        "./bootstrap.js":
            `/* eslint-disable */\n` +
            `define(["dojo/parser","dojo/ready"` +
//            includedRequires.join('","') +
            `], function(parser, ready) {\n` +
            `    ready(function() {\n` +
            `    });\n` +
            `    return {};\n` +
            `});`
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions