@nuxt/webpack-builder-nightly 4.4.0-29544389.d497aa6f → 4.4.0-29545160.b3b2cb82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -33,6 +33,7 @@ import { normalizeWebpackManifest, precomputeDependencies } from "vue-bundle-ren
|
|
|
33
33
|
import { hash } from "ohash";
|
|
34
34
|
import { serialize } from "seroval";
|
|
35
35
|
import { parseNodeModulePath } from "mlly";
|
|
36
|
+
//#region src/plugins/dynamic-base.ts
|
|
36
37
|
const defaults = {
|
|
37
38
|
globalPublicPath: "__webpack_public_path__",
|
|
38
39
|
sourcemap: true
|
|
@@ -62,6 +63,8 @@ const DynamicBasePlugin = createUnplugin((options = {}) => {
|
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
});
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/plugins/chunk.ts
|
|
65
68
|
const pluginName = "ChunkErrorPlugin";
|
|
66
69
|
var ChunkErrorPlugin = class {
|
|
67
70
|
apply(compiler) {
|
|
@@ -93,6 +96,8 @@ if (typeof ${ensureChunk} !== "undefined") {
|
|
|
93
96
|
`;
|
|
94
97
|
}
|
|
95
98
|
};
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/plugins/ssr-styles.ts
|
|
96
101
|
const CSS_URL_RE = /url\((['"]?)(\/[^)]+?)\1\)/g;
|
|
97
102
|
const isVueFile = (id) => /\.vue(?:\?|$)/.test(id);
|
|
98
103
|
const isCSSLike = (name) => /\.(?:css|scss|sass|less|styl(?:us)?|postcss|pcss)(?:\?|$)/.test(name);
|
|
@@ -410,6 +415,8 @@ var SSRStylesPlugin = class {
|
|
|
410
415
|
return cssChunks;
|
|
411
416
|
}
|
|
412
417
|
};
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/utils/mfs.ts
|
|
413
420
|
function createMFS() {
|
|
414
421
|
const _fs = { ...createFsFromVolume(new Volume()) };
|
|
415
422
|
_fs.join = join;
|
|
@@ -417,10 +424,14 @@ function createMFS() {
|
|
|
417
424
|
_fs.readFile = pify(_fs.readFile);
|
|
418
425
|
return _fs;
|
|
419
426
|
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region src/utils/index.ts
|
|
420
429
|
/** @since 3.9.0 */
|
|
421
430
|
function toArray(value) {
|
|
422
431
|
return Array.isArray(value) ? value : [value];
|
|
423
432
|
}
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region src/utils/config.ts
|
|
424
435
|
function createWebpackConfigContext(nuxt) {
|
|
425
436
|
return {
|
|
426
437
|
nuxt,
|
|
@@ -448,6 +459,8 @@ function fileName(ctx, key) {
|
|
|
448
459
|
}
|
|
449
460
|
return fileName;
|
|
450
461
|
}
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/presets/assets.ts
|
|
451
464
|
function assets(ctx) {
|
|
452
465
|
ctx.config.module.rules.push({
|
|
453
466
|
test: /\.(png|jpe?g|gif|svg|webp)$/i,
|
|
@@ -478,6 +491,8 @@ function assets(ctx) {
|
|
|
478
491
|
}]
|
|
479
492
|
});
|
|
480
493
|
}
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region src/plugins/warning-ignore.ts
|
|
481
496
|
var WarningIgnorePlugin = class {
|
|
482
497
|
filter;
|
|
483
498
|
constructor(filter) {
|
|
@@ -489,6 +504,8 @@ var WarningIgnorePlugin = class {
|
|
|
489
504
|
});
|
|
490
505
|
}
|
|
491
506
|
};
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region src/plugins/vue/util.ts
|
|
492
509
|
/**
|
|
493
510
|
* This file is based on Vue.js (MIT) webpack plugins
|
|
494
511
|
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/util.js
|
|
@@ -503,6 +520,8 @@ const extractQueryPartJS = (file) => isJSRegExp.exec(file)?.[1];
|
|
|
503
520
|
const isCSSRegExp = /\.css(?:\?[^.]+)?$/;
|
|
504
521
|
const isCSS = (file) => isCSSRegExp.test(file);
|
|
505
522
|
const isHotUpdate = (file) => file.includes("hot-update");
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region src/plugins/rollup-compat-dynamic-import.ts
|
|
506
525
|
const DYNAMIC_IMPORT_RE = /import\([^)]*\+\s*__webpack_require__[^+]*\)\.then/;
|
|
507
526
|
const DYNAMIC_IMPORT_REPLACE_RE = /import\([^)]*\+\s*(__webpack_require__[^+]*)\)\.then/g;
|
|
508
527
|
const HELPER_FILENAME = "_dynamic-import-helper.mjs";
|
|
@@ -579,6 +598,8 @@ export function _rollupDynamicImport(chunkId) {
|
|
|
579
598
|
`;
|
|
580
599
|
}
|
|
581
600
|
};
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region src/presets/base.ts
|
|
582
603
|
async function base(ctx) {
|
|
583
604
|
await applyPresets(ctx, [
|
|
584
605
|
baseAlias,
|
|
@@ -754,6 +775,8 @@ const statsMap = {
|
|
|
754
775
|
info: "normal",
|
|
755
776
|
verbose: "verbose"
|
|
756
777
|
};
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/presets/esbuild.ts
|
|
757
780
|
function esbuild(ctx) {
|
|
758
781
|
const target = ctx.isServer ? "es2020" : "chrome85";
|
|
759
782
|
ctx.config.optimization.minimizer.push(new EsbuildPlugin());
|
|
@@ -781,6 +804,8 @@ function esbuild(ctx) {
|
|
|
781
804
|
}
|
|
782
805
|
});
|
|
783
806
|
}
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region src/presets/pug.ts
|
|
784
809
|
function pug(ctx) {
|
|
785
810
|
ctx.config.module.rules.push({
|
|
786
811
|
test: /\.pug$/i,
|
|
@@ -796,6 +821,8 @@ function pug(ctx) {
|
|
|
796
821
|
}] }]
|
|
797
822
|
});
|
|
798
823
|
}
|
|
824
|
+
//#endregion
|
|
825
|
+
//#region src/utils/postcss.ts
|
|
799
826
|
const isPureObject = (obj) => obj !== null && !Array.isArray(obj) && typeof obj === "object";
|
|
800
827
|
function sortPlugins({ plugins, order }) {
|
|
801
828
|
const names = Object.keys(plugins);
|
|
@@ -841,6 +868,8 @@ async function getPostcssConfig(nuxt) {
|
|
|
841
868
|
postcssOptions
|
|
842
869
|
};
|
|
843
870
|
}
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region src/presets/style.ts
|
|
844
873
|
async function style(ctx) {
|
|
845
874
|
await applyPresets(ctx, [
|
|
846
875
|
loaders,
|
|
@@ -920,6 +949,8 @@ async function createPostcssLoadersRule(ctx) {
|
|
|
920
949
|
options: config
|
|
921
950
|
};
|
|
922
951
|
}
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region src/plugins/vue/client.ts
|
|
923
954
|
/**
|
|
924
955
|
* This file is based on Vue.js (MIT) webpack plugins
|
|
925
956
|
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/client.js
|
|
@@ -1006,6 +1037,8 @@ var VueSSRClientPlugin = class {
|
|
|
1006
1037
|
});
|
|
1007
1038
|
}
|
|
1008
1039
|
};
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region src/plugins/vue/server.ts
|
|
1009
1042
|
const JS_MAP_RE = /\.js\.map$/;
|
|
1010
1043
|
var VueSSRServerPlugin = class {
|
|
1011
1044
|
options;
|
|
@@ -1054,6 +1087,8 @@ var VueSSRServerPlugin = class {
|
|
|
1054
1087
|
});
|
|
1055
1088
|
}
|
|
1056
1089
|
};
|
|
1090
|
+
//#endregion
|
|
1091
|
+
//#region src/presets/vue.ts
|
|
1057
1092
|
function vue(ctx) {
|
|
1058
1093
|
ctx.config.plugins.push(new (VueLoaderPlugin.default || VueLoaderPlugin)());
|
|
1059
1094
|
ctx.config.module.rules.push({
|
|
@@ -1083,6 +1118,8 @@ function vue(ctx) {
|
|
|
1083
1118
|
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": ctx.nuxt.options.debug && ctx.nuxt.options.debug.hydration
|
|
1084
1119
|
}));
|
|
1085
1120
|
}
|
|
1121
|
+
//#endregion
|
|
1122
|
+
//#region src/presets/nuxt.ts
|
|
1086
1123
|
async function nuxt(ctx) {
|
|
1087
1124
|
await applyPresets(ctx, [
|
|
1088
1125
|
base,
|
|
@@ -1093,6 +1130,8 @@ async function nuxt(ctx) {
|
|
|
1093
1130
|
vue
|
|
1094
1131
|
]);
|
|
1095
1132
|
}
|
|
1133
|
+
//#endregion
|
|
1134
|
+
//#region src/configs/client.ts
|
|
1096
1135
|
async function client(ctx) {
|
|
1097
1136
|
ctx.name = "client";
|
|
1098
1137
|
ctx.isClient = true;
|
|
@@ -1198,6 +1237,8 @@ function clientPlugins(ctx) {
|
|
|
1198
1237
|
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) ctx.config.plugins.push(new TsCheckerPlugin({ logger }));
|
|
1199
1238
|
}
|
|
1200
1239
|
}
|
|
1240
|
+
//#endregion
|
|
1241
|
+
//#region src/presets/node.ts
|
|
1201
1242
|
function node(ctx) {
|
|
1202
1243
|
ctx.config.target = "node";
|
|
1203
1244
|
ctx.config.node = false;
|
|
@@ -1226,6 +1267,8 @@ function node(ctx) {
|
|
|
1226
1267
|
maxAssetSize: Number.POSITIVE_INFINITY
|
|
1227
1268
|
};
|
|
1228
1269
|
}
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/configs/server.ts
|
|
1229
1272
|
const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i;
|
|
1230
1273
|
const VIRTUAL_RE = /^\0?virtual:(?:nuxt:)?/;
|
|
1231
1274
|
async function server(ctx) {
|
|
@@ -1318,6 +1361,8 @@ function serverPlugins(ctx) {
|
|
|
1318
1361
|
}));
|
|
1319
1362
|
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) ctx.config.plugins.push(new TsCheckerPlugin({ logger }));
|
|
1320
1363
|
}
|
|
1364
|
+
//#endregion
|
|
1365
|
+
//#region src/webpack.ts
|
|
1321
1366
|
const bundle = async (nuxt) => {
|
|
1322
1367
|
const webpackConfigs = await Promise.all([client, ...nuxt.options.ssr ? [server] : []].map(async (preset) => {
|
|
1323
1368
|
const ctx = createWebpackConfigContext(nuxt);
|
|
@@ -1456,4 +1501,5 @@ async function compile(compiler) {
|
|
|
1456
1501
|
function defineEventHandler(handler) {
|
|
1457
1502
|
return Object.assign(handler, { __is_handler__: true });
|
|
1458
1503
|
}
|
|
1504
|
+
//#endregion
|
|
1459
1505
|
export { bundle };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalize, relative } from "pathe";
|
|
2
|
+
//#region src/loaders/vue-module-identifier.ts
|
|
2
3
|
const vueModuleIdentifierLoader = function(source) {
|
|
3
4
|
this.cacheable?.();
|
|
4
5
|
const { srcDir } = this.getOptions() || {};
|
|
@@ -8,4 +9,5 @@ const vueModuleIdentifierLoader = function(source) {
|
|
|
8
9
|
const moduleId = normalize(context ? relative(context, resourcePath) : resourcePath).replace(/^\.\//, "").replace(/\\/g, "/");
|
|
9
10
|
return source + `\n;__exports__.__moduleIdentifier = ${JSON.stringify(moduleId)};`;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { vueModuleIdentifierLoader as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder-nightly",
|
|
3
|
-
"version": "4.4.0-
|
|
3
|
+
"version": "4.4.0-29545160.b3b2cb82",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
28
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.0-
|
|
28
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.0-29545160.b3b2cb82",
|
|
29
29
|
"@vue/compiler-sfc": "3.5.29",
|
|
30
30
|
"autoprefixer": "^10.4.27",
|
|
31
31
|
"css-loader": "^7.1.4",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"jiti": "^2.6.1",
|
|
41
41
|
"knitwork": "^1.3.0",
|
|
42
42
|
"magic-string": "^0.30.21",
|
|
43
|
-
"memfs": "^4.56.
|
|
43
|
+
"memfs": "^4.56.11",
|
|
44
44
|
"mini-css-extract-plugin": "^2.10.0",
|
|
45
|
-
"mlly": "^1.8.
|
|
45
|
+
"mlly": "^1.8.1",
|
|
46
46
|
"ohash": "^2.0.11",
|
|
47
47
|
"pathe": "^2.0.3",
|
|
48
48
|
"pify": "^6.1.0",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"url-loader": "^4.1.1",
|
|
63
63
|
"vue-bundle-renderer": "^2.2.0",
|
|
64
64
|
"vue-loader": "^17.4.2",
|
|
65
|
-
"webpack": "^5.105.
|
|
65
|
+
"webpack": "^5.105.4",
|
|
66
66
|
"webpack-bundle-analyzer": "^5.2.0",
|
|
67
67
|
"webpack-dev-middleware": "^7.4.5",
|
|
68
68
|
"webpack-hot-middleware": "^2.26.1",
|
|
69
69
|
"webpackbar": "^7.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.0-
|
|
72
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.0-29545160.b3b2cb82",
|
|
73
73
|
"@rspack/core": "1.7.7",
|
|
74
74
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
75
75
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vue": "3.5.29"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"nuxt": "npm:nuxt-nightly@4.4.0-
|
|
83
|
+
"nuxt": "npm:nuxt-nightly@4.4.0-29545160.b3b2cb82",
|
|
84
84
|
"vue": "^3.3.4"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|