output.tempDir

  • Type: string
  • Default: ''

When developing or building a project, Modern.js generates real Webpack entries and HTML templates, placing them in a temporary directory.

If you want to start a project with multiple configurations at the same time, you can use this configuration to generate files in different temporary directories to avoid interference with each other.

The configuration can be a relative or absolute path, but paths outside the project should be avoided.

Example:

export default {
  output: {
    tempDir: path.join('node_modules', '.temp-dir'),
  }
}