output.enableAssetFallback

  • Type: boolean
  • Default: false

If this option is enabled, all unrecognized files will be emitted to the dist directory; otherwise, an exception will be thrown.

Example

Enable the config:

export default {
  output: {
    enableAssetFallback: true,
  },
};

Import a module of unknown type in code:

import './foo.xxx';

After compilation, foo.xxx will be output to the dist/static/media directory.

You can control the output path and filename after fallback through the output.distPath.media and output.filename.media configs.

TIP

Enabling this config will change the rules structure in the webpack config. In most cases, we do not recommend using this config.

ON THIS PAGE