Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
]),
// Generate the `index.html`
new ExpoHtmlWebpackPlugin(env),
// Add variables to the `index.html`
new InterpolateHtmlPlugin(ExpoHtmlWebpackPlugin, {
WEB_PUBLIC_URL: publicPath,
WEB_TITLE: config.web.name,
NO_SCRIPT: noJSComponent,
LANG_ISO_CODE: lang,
ROOT_ID: rootId,
}),
new WebpackPWAManifestPlugin(config, {
publicPath,
noResources: isDev || !env.pwa,
filename: locations.production.manifest,
HtmlWebpackPlugin: ExpoHtmlWebpackPlugin,
}),
// This gives some necessary context to module not found errors, such as
// the requesting resource.
new ModuleNotFoundPlugin(locations.root),
new ExpoDefinePlugin({
mode,
publicUrl,
config,
productionManifestPath: locations.production.manifest,
}),
{
from: locations.template.favicon,
to: locations.production.favicon,
},
{
from: locations.template.serviceWorker,
to: locations.production.serviceWorker,
},
]),
// Generate the `index.html`
new ExpoHtmlWebpackPlugin(env),
ExpoInterpolateHtmlPlugin.fromEnv(env, ExpoHtmlWebpackPlugin),
new WebpackPWAManifestPlugin(config, {
publicPath,
projectRoot: env.projectRoot,
noResources: !generatePWAImageAssets,
filename: locations.production.manifest,
HtmlWebpackPlugin: ExpoHtmlWebpackPlugin,
}),
// This gives some necessary context to module not found errors, such as
// the requesting resource.
new ModuleNotFoundPlugin(locations.root),
new ExpoDefinePlugin({
mode,
publicUrl,
config,
productionManifestPath: locations.production.manifest,