From edd19b11b95b8add0b039244f1bf1217c160e9c3 Mon Sep 17 00:00:00 2001 From: Tanveer Gill Date: Mon, 26 Sep 2022 07:19:36 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20getting=20started=20doc?= =?UTF-8?q?s:=20jsonpFunction=20->=20chunkLoadingGlobal=20Webpack=20v5=20(?= =?UTF-8?q?#2226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide/getting-started.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 7a748a2..c2991b7 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -92,6 +92,20 @@ In addition to exposing the corresponding life-cycle hooks in the code, in order #### webpack: +If using Webpack v5: +```js +const packageName = require('./package.json').name; + +module.exports = { + output: { + library: `${packageName}-[name]`, + libraryTarget: 'umd', + chunkLoadingGlobal: `webpackJsonp_${packageName}`, + }, +}; +``` + +If using Webpack v4: ```js const packageName = require('./package.json').name;