Skip to content

[Webpack] Error overlay configuration #562

Description

@sylvhama

The overlay option for PreactRefreshPlugin is typed as a boolean in node_modules/@types/prefresh__webpack/index.d.ts

interface Options {
    overlay?: boolean;
    runsInNextJs?: boolean;
}

If I try to set it to true, an error will be thrown:

TypeError: The "request" argument must be of type string. Received undefined
    at Function.resolve (node:internal/modules/helpers:147:5)
    at ReloadPlugin.apply (/path/to/your/project/node_modules/@prefresh/webpack/src/index.js:135:45)
    at createCompiler (/path/to/your/project/node_modules/webpack/lib/webpack.js:81:12)
    at create (/path/to/your/project/node_modules/webpack/lib/webpack.js:154:16)
    at webpack (/path/to/your/project/node_modules/webpack/lib/webpack.js:182:32)
    at f (/path/to/your/project/node_modules/webpack/lib/index.js:78:21)
    at Object.<anonymous> (/path/to/your/project/scripts/run-dev-server.ts:14:25)
    at Module._compile (node:internal/modules/cjs/loader:1565:14)
    at Module.m._compile (/path/to/your/project/node_modules/ts-node/src/index.ts:1618:23)
    at node:internal/modules/cjs/loader:1708:10 {
  code: 'ERR_INVALID_ARG_TYPE'
}

Based on this PR: #289 ; I guess it expects an object with a module key, what should I pass there then?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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