import loaders from './config/webpack/loaders'
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'

export default {
  src: './src',
  files: '**/*.mdx',
  title: '@copart/core-components',
  debug: false,
  dest: './docz-deploy',
  public: './src/',
  htmlContext: {
    head: {
      links: [
        {
          rel: 'stylesheet',
          href: 'https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css',
        },
        {
          rel: 'stylesheet',
          href: 'https://cdn.jsdelivr.net/npm/photo-sphere-viewer@3.5.1/dist/photo-sphere-viewer.css',
        },
      ],
    },
  },
  codeSandbox: false,
  indexHtml: './src/docz.html',
  themeConfig: {
    styles: {
      body: {
        fontFamily: "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI'",
      },
    },
  },

  modifyBundlerConfig: (config) => {
    // config.module.rules.push(loaders.js)
    config.module.rules.push(loaders.css)
    config.module.rules.push(loaders.url)
    config.optimization.minimize = false
    // config.plugins = [new BundleAnalyzerPlugin()] // Super useful tool to look at bundle size
    return config
  },
}
