How to use the just-scripts.htmlOverlay function in just-scripts

To help you get started, we’ve selected a few just-scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / fluent-ui-react / packages / digest / src / webpack.config.ts View on Github external
export const defaultConfig = (digestConfig: DigestConfig): webpack.Configuration[] => {
  // TODO: optimize configs to share common instances and remove usage of just (use webpack-merge directly)
  const bundle = webpackMerge(
    webpackConfig,
    htmlOverlay({
      // TODO: is require.resolve really needed here? path.join / __dirname instead?
      template: require.resolve('../assets/index.html'),
    }),
    {
      // TODO: should entry really be pointing to lib output rather than ts?
      // TODO: reduce to entry: string?
      entry: {
        digest: require.resolve('../lib/bundle/index.digest.js'),
      },
      mode: 'production',
      output: {
        filename: '[name].js',
      },
      resolve: {
        alias: {
          // TODO: this needs to work for both digest and consumer