Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 612cffd

Browse files
committed
refactor: rename common chunk to vendor
1 parent f9bbea9 commit 612cffd

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

Diff for: templates/webpack.angular.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ module.exports = env => {
103103
optimization: {
104104
splitChunks: {
105105
cacheGroups: {
106-
common: {
107-
name: "common",
106+
vendor: {
107+
name: "vendor",
108108
chunks: "all",
109109
test: (module, chunks) => {
110110
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
@@ -200,7 +200,6 @@ module.exports = env => {
200200
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
201201
// Generate a bundle starter script and activate it in package.json
202202
new nsWebpack.GenerateBundleStarterPlugin([
203-
"./common",
204203
"./bundle",
205204
]),
206205
// Support for web workers since v3.2
@@ -234,7 +233,7 @@ module.exports = env => {
234233

235234
if (snapshot) {
236235
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
237-
chunk: "common",
236+
chunk: "vendor",
238237
requireModules: [
239238
"reflect-metadata",
240239
"@angular/platform-browser",

Diff for: templates/webpack.javascript.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ module.exports = env => {
9999
optimization: {
100100
splitChunks: {
101101
cacheGroups: {
102-
common: {
103-
name: "common",
102+
vendor: {
103+
name: "vendor",
104104
chunks: "all",
105105
test: (module, chunks) => {
106106
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
@@ -183,7 +183,6 @@ module.exports = env => {
183183
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
184184
// Generate a bundle starter script and activate it in package.json
185185
new nsWebpack.GenerateBundleStarterPlugin([
186-
"./common",
187186
"./bundle",
188187
]),
189188
// Support for web workers since v3.2
@@ -210,7 +209,7 @@ module.exports = env => {
210209

211210
if (snapshot) {
212211
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
213-
chunk: "common",
212+
chunk: "vendor",
214213
requireModules: [
215214
"tns-core-modules/bundle-entry-points",
216215
],

Diff for: templates/webpack.typescript.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ module.exports = env => {
9999
optimization: {
100100
splitChunks: {
101101
cacheGroups: {
102-
common: {
103-
name: "common",
102+
vendor: {
103+
name: "vendor",
104104
chunks: "all",
105105
test: (module, chunks) => {
106106
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
@@ -185,7 +185,6 @@ module.exports = env => {
185185
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
186186
// Generate a bundle starter script and activate it in package.json
187187
new nsWebpack.GenerateBundleStarterPlugin([
188-
"./common",
189188
"./bundle",
190189
]),
191190
// Support for web workers since v3.2
@@ -212,7 +211,7 @@ module.exports = env => {
212211

213212
if (snapshot) {
214213
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
215-
chunk: "common",
214+
chunk: "vendor",
216215
requireModules: [
217216
"tns-core-modules/bundle-entry-points",
218217
],

0 commit comments

Comments
 (0)