Skip to content

Cannot get Elements to work in Docusaurus #1777

Answered by vaibhavshn
vaibhavshn asked this question in Q&A
Discussion options

You must be logged in to vote

Solved it!

Used this webpack config:

const config = {
  module: {
    rules: [
      {
        test: /\.m?js/,
        resolve: {
          fullySpecified: false,
        },
      },
    ],
  },
  plugins: [
    new ProvidePlugin({
      process: require.resolve('process/browser'),
    }),
  ],
  resolve: {
    fallback: {
      buffer: require.resolve('buffer'),
      stream: false,
      path: false,
      process: false,
    },
  },
};

This helped: https://github.com/stoplightio/elements/pull/1640/files/db2a2a547aa4a3b567c02d254ff080c8cdddcfbd#diff-cafe2123a72c4ce3a9f7e9ee4b0e188256eb02d7ec1e54fa2cadfac99b22f92b

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@yhuard
Comment options

@jvyang
Comment options

@yhuard
Comment options

@jvyang
Comment options

@bucanero
Comment options

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