webpack-node-externals icon indicating copy to clipboard operation
webpack-node-externals copied to clipboard

version 3.0.0 - moduleFromFile fileName not working

Open sverraest opened this issue 3 years ago • 0 comments

Seems like the fileName is not picked up when using this plugin. See below, where I for testing purposes a completely fake path, it still just gives an error

Configuration:

externals: [
    'aws-sdk',
    nodeExternals({
      modulesFromFile: {
        fileName: path.join(__dirname, "../../totally-fake-file.json")
      }
    })
  ],
  Error: ENOENT: no such file or directory, open '/my-working-dir/sub1/package.json'

My package.json is in a higher folder and I need to set it explicitly but the path is not being picked up when running this.

sverraest avatar Jul 08 '21 07:07 sverraest