repo_description: Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
repo_topics: api api-documentation gatsby hacktoberfest openapi openapi3 openapi3-1 react stoplight-elements stoplight-oss swagger-oss
code: const path = require('path');
  const webpack = require('webpack');
  const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
  
  module.exports = {
    mode: 'production',
    entry: './src/web-components/index.ts',
    resolve: {
      extensions: ['.tsx', '.ts', '.js', '.jsx'],
      plugins: [new TsconfigPathsPlugin()],
      fallback: {
        stream: false,
        path: false,
        process: require.resolve('process/browser'),
      },
    },
    performance: {
      maxEntrypointSize: 2000000,
      maxAssetSize: 2000000,
    },
    output: {
      filename: 'web-components.min.js',
      path: path.join(process.cwd(), 'dist'),
    },
    module: {
      rules: [
        {
          test: /\.mjs$/,
          include: /node_modules/,
          resolve: {
            fullySpecified: false,
          },
        },
        {
          test: /\.tsx?$/,
          loader: 'ts-loader',
          exclude: /node_modules/,
        },
      ],
    },
    plugins: [
      new webpack.ProvidePlugin({
        process: require.resolve('process/browser'),
      }),
    ],
  };
  