prismatic-io / embedded

Prismatic's library for embedding Prismatic.io into your application.
MIT License
24 stars 3 forks source link

Hotfix - Global Rewrite for Browser Envs #20

Closed jasoncomes closed 1 year ago

jasoncomes commented 1 year ago

The problem is, I think, this target: 'node' in your webpack.config.js. This states basically that Webpack may assume that the bundle will be running in a node-like environment, where globals like global and require are provided by the environment. Unless otherwise specified, Webpack assumes a browser environment and rewrites global to point to window. Your configuration disables this rewriting.

You could either remove target: 'node' from your config, or explicitly enable global rewriting by adding node: {global: true} to your config object.