Skip to content

Webpack plugin fails in a fresh Next.js app #1316

Closed

Description

@holdenmatt

Bug Report

I'm trying to use Perspective in a fresh Next.js app, and neither of the documented webpack config options work, so I'm only able to use it in INLINE mode.

I've spent a few hours trying to debug unsuccessfully, so created a clean repo to reproduce the issue.

Steps to Reproduce:

  1. Create a fresh Next.JS app using npx create-next-app: https://nextjs.org/docs/api-reference/create-next-app
  2. npm install @finos/perspective @finos/perspective-webpack-plugin
  3. Add a minimal next.config.js file to add new PerspectivePlugin() as a webpack plugin.

Expected Result:

Perspective should work without errors using the webpack plugin from the documentation.

Actual Result:

I get 404s for psp.async.wasm and perspective.wasm.worker.js and a slew of errors.

image

Environment:

image

Additional Context:

I created a clean repo here that reproduces the error:
https://github.com/holdenmatt/perspective-nextjs/blob/main/next.config.js

Appreciate any suggestions or fixes for this.

Activity

  1. locked and limited conversation to collaborators on Mar 27, 2021
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