Skip to content

webpack injects document into bundle, which fails eval #2135

Answered by Mrtenz
rygine asked this question in Q&A
Discussion options

You must be logged in to vote

Does this solve the problem? This should disable JsonpChunkLoadingRuntimeModule.

import type { SnapConfig } from '@metamask/snaps-cli';
import { merge } from '@metamask/snaps-cli';

const config: SnapConfig = {
  // ...
  customizeWebpackConfig: (baseConfig) => {
    return merge(baseConfig, {
      output: {
        chunkFormat: 'commonjs',
      },
    });
  },
};

export default config;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rygine
Comment options

@Mrtenz
Comment options

Answer selected by Mrtenz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants