Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Move pathPrefix to separate option #132

@muhammadyusuf-kurbonov

Description

@muhammadyusuf-kurbonov

Modification Proposal

Move the __dirname + require("path").sep + __webpack_public_path__ part of code to options. For example, this code is breaking use case with NextJS (Goto Actual behavior section)

Expected Behavior / Situation

Create an option: prefixPath with default of __dirname + require("path").sep + __webpack_public_path__

Actual Behavior / Situation

Broken use case with NextJS

Error node-loader: /home/user/my-project/.next/server/vendor-chunks//_next/9f92b6e3c34a390e5737ac41938d7846.node: cannot open shared object file: No such file or directory

Should be for working correctly:

outputPath + _next/9f92b6e3c34a390e5737ac41938d7846.node Link to next-node-laoder

But this library doesn't expose the name option. This causes conflicts.

Please paste the results of npx webpack-cli info here, and mention other relevant information

  System:
    OS: Linux 6.7 Fedora Linux 39 (Workstation Edition)
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
    Memory: 4.95 GB / 15.36 GB
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
  Browsers:
    Chrome: 122.0.6261.128
  Packages:
    loader-utils: ^3.2.1 => 3.2.1 
    nextjs-node-loader: ^1.1.5 => 1.1.5 
    node-loader: ^2.0.0 => 2.0.0 

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