webpack-asset-relocator-loader

This loader wraps `@vercel/[email protected]` and modifies loading paths so that they are compatible with [**Electron Forge**](https://www.electronforge.io/config/plugins/webpack).

MIT License

Downloads
810
Stars
11

@timfish/webpack-asset-relocator-loader

This loader wraps @vercel/[email protected] and modifies loading paths so that they are compatible with Electron Forge.

It works in development and production for both main and renderer processes.

This replaces @marshallofsound/webpack-asset-relocator-loader which has become unmaintained.

Add it to your loader rules in the same way as before:

module.exports = {
  module: {
    rules: [
      {
        test: /\.node$/,
        use: "node-loader",
      },
      {
        test: /\.(m?js|node)$/,
        parser: { amd: false },
        use: {
          loader: "@timfish/webpack-asset-relocator-loader",
          options: {
            outputAssetBase: "native_modules",
          },
        },
      },
    ],
  },
};