Interface: OutputPluginConfig
plugins.OutputPluginConfig
OutputPlugin configuration options.
Table of contents
Properties
Properties
context
• context: string
Context in which all resolution happens. Usually it's project root directory.
Defined in
packages/repack/src/webpack/plugins/OutputPlugin.ts:64
enabled
• Optional
enabled: boolean
Whether the plugin is enabled. Defaults to true
.
Useful when running with development server, in which case, it's not necessary for this plugin to be enabled.
Defined in
packages/repack/src/webpack/plugins/OutputPlugin.ts:75
entryName
• Optional
entryName: string
The entry chunk name, main
by default.
Defined in
packages/repack/src/webpack/plugins/OutputPlugin.ts:78
extraChunks
• Optional
extraChunks: DestinationSpec
[]
Options specifying how to deal with extra chunks generated in the compilation,
usually by using dynamic import(...)
function.
By default all extra chunks will be saved under <projectRoot>/build/outputs/<platform>/remotes
directory.
Specifying custom value for this option, will disable default setting - you will need
to configure outputPath
for type: 'remote'
yourself.
If you want to have some of the chunks available inside the .ipa
/.apk
file generated by React Native,
you must configure this options to match the chunks you want (using test
/include
/exclude
)
and set the type
to local
, for example:
new OutputPlugin({
context,
platform,
output,
extraChunks: [
{
// Make `my-chunk` local
include: /my-chunk/,
type: 'local',
},
{
// Make any other chunk remote
exclude: /my-chunk/,
type: 'remote',
outputPath,
},
]
});
Defined in
packages/repack/src/webpack/plugins/OutputPlugin.ts:136
output
• output: Object
Output options specifying where to save generated bundle, source map and assets.
Type declaration
Name | Type | Description |
---|---|---|
assetsPath? | string | Assets output path - directory where generated static assets will be saved. |
auxiliaryAssetsPath? | string | Auxiliary assets output path - directory where generated auxiliary assets will be saved Useful when working with remote-assets generated by assetsLoader |
bundleFilename? | string | Bundle output filename - name under which generated bundle will be saved. |
sourceMapFilename? | string | Source map filename - name under which generated source map (for the main bundle) will be saved. |
Defined in
packages/repack/src/webpack/plugins/OutputPlugin.ts:83
platform
• platform: string
Target application platform.