@nuxt/webpack-builder-nightly 4.4.3-29621460.375401cc → 4.4.3-29621635.a4e85d14
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.d.mts +0 -3
- package/dist/index.mjs +0 -69
- package/dist/loaders/vue-module-identifier.mjs +0 -2
- package/package.json +22 -22
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,6 @@ import { normalizeWebpackManifest, precomputeDependencies } from "vue-bundle-ren
|
|
|
31
31
|
import { hash } from "ohash";
|
|
32
32
|
import { serialize } from "seroval";
|
|
33
33
|
import { parseNodeModulePath } from "mlly";
|
|
34
|
-
//#region src/plugins/dynamic-base.ts
|
|
35
34
|
const defaults = {
|
|
36
35
|
globalPublicPath: "__webpack_public_path__",
|
|
37
36
|
sourcemap: true
|
|
@@ -61,8 +60,6 @@ const DynamicBasePlugin = createUnplugin((options = {}) => {
|
|
|
61
60
|
}
|
|
62
61
|
};
|
|
63
62
|
});
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/plugins/chunk.ts
|
|
66
63
|
const pluginName = "ChunkErrorPlugin";
|
|
67
64
|
var ChunkErrorPlugin = class {
|
|
68
65
|
apply(compiler) {
|
|
@@ -94,14 +91,6 @@ if (typeof ${ensureChunk} !== "undefined") {
|
|
|
94
91
|
`;
|
|
95
92
|
}
|
|
96
93
|
};
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region ../nuxt/src/core/utils/plugins.ts
|
|
99
|
-
/**
|
|
100
|
-
* Split a bundler module ID into its pathname and search (query) parts.
|
|
101
|
-
*
|
|
102
|
-
* Module IDs from Vite/webpack are already-normalized filesystem paths
|
|
103
|
-
* that may carry query strings (e.g. `?vue&type=style&lang=css`).
|
|
104
|
-
*/
|
|
105
94
|
function parseModuleId(id) {
|
|
106
95
|
const qIndex = id.indexOf("?");
|
|
107
96
|
if (qIndex === -1) return {
|
|
@@ -113,8 +102,6 @@ function parseModuleId(id) {
|
|
|
113
102
|
search: id.slice(qIndex)
|
|
114
103
|
};
|
|
115
104
|
}
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/plugins/ssr-styles.ts
|
|
118
105
|
const CSS_URL_RE = /url\((['"]?)(\/[^)]+?)\1\)/g;
|
|
119
106
|
const isVueFile = (id) => /\.vue(?:\?|$)/.test(id);
|
|
120
107
|
const isCSSLike = (name) => /\.(?:css|scss|sass|less|styl(?:us)?|postcss|pcss)(?:\?|$)/.test(name);
|
|
@@ -427,8 +414,6 @@ var SSRStylesPlugin = class {
|
|
|
427
414
|
return cssChunks;
|
|
428
415
|
}
|
|
429
416
|
};
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region src/utils/mfs.ts
|
|
432
417
|
function createMFS() {
|
|
433
418
|
const _fs = { ...createFsFromVolume(new Volume()) };
|
|
434
419
|
_fs.join = join;
|
|
@@ -436,14 +421,9 @@ function createMFS() {
|
|
|
436
421
|
_fs.readFile = pify(_fs.readFile);
|
|
437
422
|
return _fs;
|
|
438
423
|
}
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/utils/index.ts
|
|
441
|
-
/** @since 3.9.0 */
|
|
442
424
|
function toArray(value) {
|
|
443
425
|
return Array.isArray(value) ? value : [value];
|
|
444
426
|
}
|
|
445
|
-
//#endregion
|
|
446
|
-
//#region src/utils/config.ts
|
|
447
427
|
function createWebpackConfigContext(nuxt) {
|
|
448
428
|
return {
|
|
449
429
|
nuxt,
|
|
@@ -471,8 +451,6 @@ function fileName(ctx, key) {
|
|
|
471
451
|
}
|
|
472
452
|
return fileName;
|
|
473
453
|
}
|
|
474
|
-
//#endregion
|
|
475
|
-
//#region src/presets/assets.ts
|
|
476
454
|
function assets(ctx) {
|
|
477
455
|
ctx.config.module.rules.push({
|
|
478
456
|
test: /\.(png|jpe?g|gif|svg|webp)$/i,
|
|
@@ -503,8 +481,6 @@ function assets(ctx) {
|
|
|
503
481
|
}]
|
|
504
482
|
});
|
|
505
483
|
}
|
|
506
|
-
//#endregion
|
|
507
|
-
//#region src/plugins/warning-ignore.ts
|
|
508
484
|
var WarningIgnorePlugin = class {
|
|
509
485
|
filter;
|
|
510
486
|
constructor(filter) {
|
|
@@ -516,12 +492,6 @@ var WarningIgnorePlugin = class {
|
|
|
516
492
|
});
|
|
517
493
|
}
|
|
518
494
|
};
|
|
519
|
-
//#endregion
|
|
520
|
-
//#region src/plugins/vue/util.ts
|
|
521
|
-
/**
|
|
522
|
-
* This file is based on Vue.js (MIT) webpack plugins
|
|
523
|
-
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/util.js
|
|
524
|
-
*/
|
|
525
495
|
const validate = (compiler) => {
|
|
526
496
|
if (compiler.options.target !== "node") logger.warn("webpack config `target` should be \"node\".");
|
|
527
497
|
if (!compiler.options.externals) logger.info("It is recommended to externalize dependencies in the server build for better build performance.");
|
|
@@ -532,17 +502,10 @@ const extractQueryPartJS = (file) => isJSRegExp.exec(file)?.[1];
|
|
|
532
502
|
const isCSSRegExp = /\.css(?:\?[^.]+)?$/;
|
|
533
503
|
const isCSS = (file) => isCSSRegExp.test(file);
|
|
534
504
|
const isHotUpdate = (file) => file.includes("hot-update");
|
|
535
|
-
//#endregion
|
|
536
|
-
//#region src/plugins/rollup-compat-dynamic-import.ts
|
|
537
505
|
const DYNAMIC_IMPORT_RE = /import\([^)]*\+\s*__webpack_require__[^+]*\)\.then/;
|
|
538
506
|
const DYNAMIC_IMPORT_REPLACE_RE = /import\([^)]*\+\s*(__webpack_require__[^+]*)\)\.then/g;
|
|
539
507
|
const HELPER_FILENAME = "_dynamic-import-helper.mjs";
|
|
540
508
|
const HELPER_IMPORT = `import { _rollupDynamicImport } from "./${HELPER_FILENAME}";\n`;
|
|
541
|
-
/**
|
|
542
|
-
* Webpack plugin that generates rollup-compatible dynamic imports.
|
|
543
|
-
* This plugin uses webpack's native compilation hooks to override dynamic import generation
|
|
544
|
-
* and create rollup-compatible code directly during webpack's compilation process.
|
|
545
|
-
*/
|
|
546
509
|
var RollupCompatDynamicImportPlugin = class {
|
|
547
510
|
apply(compiler) {
|
|
548
511
|
compiler.hooks.compilation.tap("RollupCompatDynamicImportPlugin", (compilation) => {
|
|
@@ -610,8 +573,6 @@ export function _rollupDynamicImport(chunkId) {
|
|
|
610
573
|
`;
|
|
611
574
|
}
|
|
612
575
|
};
|
|
613
|
-
//#endregion
|
|
614
|
-
//#region src/presets/base.ts
|
|
615
576
|
async function base(ctx) {
|
|
616
577
|
await applyPresets(ctx, [
|
|
617
578
|
baseAlias,
|
|
@@ -787,8 +748,6 @@ const statsMap = {
|
|
|
787
748
|
info: "normal",
|
|
788
749
|
verbose: "verbose"
|
|
789
750
|
};
|
|
790
|
-
//#endregion
|
|
791
|
-
//#region src/presets/esbuild.ts
|
|
792
751
|
function esbuild(ctx) {
|
|
793
752
|
const target = ctx.isServer ? "es2020" : "chrome85";
|
|
794
753
|
ctx.config.optimization.minimizer.push(new EsbuildPlugin());
|
|
@@ -816,8 +775,6 @@ function esbuild(ctx) {
|
|
|
816
775
|
}
|
|
817
776
|
});
|
|
818
777
|
}
|
|
819
|
-
//#endregion
|
|
820
|
-
//#region src/presets/pug.ts
|
|
821
778
|
function pug(ctx) {
|
|
822
779
|
ctx.config.module.rules.push({
|
|
823
780
|
test: /\.pug$/i,
|
|
@@ -833,8 +790,6 @@ function pug(ctx) {
|
|
|
833
790
|
}] }]
|
|
834
791
|
});
|
|
835
792
|
}
|
|
836
|
-
//#endregion
|
|
837
|
-
//#region src/utils/postcss.ts
|
|
838
793
|
const isPureObject = (obj) => obj !== null && !Array.isArray(obj) && typeof obj === "object";
|
|
839
794
|
function sortPlugins({ plugins, order }) {
|
|
840
795
|
const names = Object.keys(plugins);
|
|
@@ -880,8 +835,6 @@ async function getPostcssConfig(nuxt) {
|
|
|
880
835
|
postcssOptions
|
|
881
836
|
};
|
|
882
837
|
}
|
|
883
|
-
//#endregion
|
|
884
|
-
//#region src/presets/style.ts
|
|
885
838
|
async function style(ctx) {
|
|
886
839
|
await applyPresets(ctx, [
|
|
887
840
|
loaders,
|
|
@@ -961,12 +914,6 @@ async function createPostcssLoadersRule(ctx) {
|
|
|
961
914
|
options: config
|
|
962
915
|
};
|
|
963
916
|
}
|
|
964
|
-
//#endregion
|
|
965
|
-
//#region src/plugins/vue/client.ts
|
|
966
|
-
/**
|
|
967
|
-
* This file is based on Vue.js (MIT) webpack plugins
|
|
968
|
-
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/client.js
|
|
969
|
-
*/
|
|
970
917
|
var VueSSRClientPlugin = class {
|
|
971
918
|
serverDist;
|
|
972
919
|
nuxt;
|
|
@@ -1065,8 +1012,6 @@ var VueSSRClientPlugin = class {
|
|
|
1065
1012
|
});
|
|
1066
1013
|
}
|
|
1067
1014
|
};
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region src/plugins/vue/server.ts
|
|
1070
1015
|
const JS_MAP_RE = /\.js\.map$/;
|
|
1071
1016
|
var VueSSRServerPlugin = class {
|
|
1072
1017
|
options;
|
|
@@ -1115,8 +1060,6 @@ var VueSSRServerPlugin = class {
|
|
|
1115
1060
|
});
|
|
1116
1061
|
}
|
|
1117
1062
|
};
|
|
1118
|
-
//#endregion
|
|
1119
|
-
//#region src/presets/vue.ts
|
|
1120
1063
|
function vue(ctx) {
|
|
1121
1064
|
ctx.nuxt.hooks.hookOnce(`${builder}:config`, () => {
|
|
1122
1065
|
ctx.nuxt.hook(`${builder}:configResolved`, (configs) => {
|
|
@@ -1150,8 +1093,6 @@ function vue(ctx) {
|
|
|
1150
1093
|
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": ctx.nuxt.options.debug && ctx.nuxt.options.debug.hydration
|
|
1151
1094
|
}));
|
|
1152
1095
|
}
|
|
1153
|
-
//#endregion
|
|
1154
|
-
//#region src/presets/nuxt.ts
|
|
1155
1096
|
async function nuxt(ctx) {
|
|
1156
1097
|
await applyPresets(ctx, [
|
|
1157
1098
|
base,
|
|
@@ -1162,8 +1103,6 @@ async function nuxt(ctx) {
|
|
|
1162
1103
|
vue
|
|
1163
1104
|
]);
|
|
1164
1105
|
}
|
|
1165
|
-
//#endregion
|
|
1166
|
-
//#region src/configs/client.ts
|
|
1167
1106
|
async function client(ctx) {
|
|
1168
1107
|
ctx.name = "client";
|
|
1169
1108
|
ctx.isClient = true;
|
|
@@ -1269,8 +1208,6 @@ function clientPlugins(ctx) {
|
|
|
1269
1208
|
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 }));
|
|
1270
1209
|
}
|
|
1271
1210
|
}
|
|
1272
|
-
//#endregion
|
|
1273
|
-
//#region src/presets/node.ts
|
|
1274
1211
|
function node(ctx) {
|
|
1275
1212
|
ctx.config.target = "node";
|
|
1276
1213
|
ctx.config.node = false;
|
|
@@ -1299,8 +1236,6 @@ function node(ctx) {
|
|
|
1299
1236
|
maxAssetSize: Number.POSITIVE_INFINITY
|
|
1300
1237
|
};
|
|
1301
1238
|
}
|
|
1302
|
-
//#endregion
|
|
1303
|
-
//#region src/configs/server.ts
|
|
1304
1239
|
const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i;
|
|
1305
1240
|
const VIRTUAL_RE = /^\0?virtual:(?:nuxt:)?/;
|
|
1306
1241
|
async function server(ctx) {
|
|
@@ -1393,8 +1328,6 @@ function serverPlugins(ctx) {
|
|
|
1393
1328
|
}));
|
|
1394
1329
|
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 }));
|
|
1395
1330
|
}
|
|
1396
|
-
//#endregion
|
|
1397
|
-
//#region src/webpack.ts
|
|
1398
1331
|
const bundle = async (nuxt) => {
|
|
1399
1332
|
const webpackConfigs = await Promise.all([client, ...nuxt.options.ssr ? [server] : []].map(async (preset) => {
|
|
1400
1333
|
const ctx = createWebpackConfigContext(nuxt);
|
|
@@ -1402,7 +1335,6 @@ const bundle = async (nuxt) => {
|
|
|
1402
1335
|
await applyPresets(ctx, preset);
|
|
1403
1336
|
return ctx.config;
|
|
1404
1337
|
}));
|
|
1405
|
-
/** Remove Nitro rollup plugin for handling dynamic imports from webpack chunks */
|
|
1406
1338
|
if (!nuxt.options.dev) useNitro().hooks.hook("rollup:before", (_nitro, config) => {
|
|
1407
1339
|
const plugins = config.plugins;
|
|
1408
1340
|
const existingPlugin = plugins.findIndex((i) => i && "name" in i && i.name === "dynamic-require");
|
|
@@ -1529,5 +1461,4 @@ async function compile(compiler) {
|
|
|
1529
1461
|
function defineEventHandler(handler) {
|
|
1530
1462
|
return Object.assign(handler, { __is_handler__: true });
|
|
1531
1463
|
}
|
|
1532
|
-
//#endregion
|
|
1533
1464
|
export { bundle };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { normalize, relative } from "pathe";
|
|
2
|
-
//#region src/loaders/vue-module-identifier.ts
|
|
3
2
|
const vueModuleIdentifierLoader = function(source) {
|
|
4
3
|
this.cacheable?.();
|
|
5
4
|
const { srcDir } = this.getOptions() || {};
|
|
@@ -9,5 +8,4 @@ const vueModuleIdentifierLoader = function(source) {
|
|
|
9
8
|
const moduleId = normalize(context ? relative(context, resourcePath) : resourcePath).replace(/^\.\//, "").replace(/\\/g, "/");
|
|
10
9
|
return source + `\n;__exports__.__moduleIdentifier = ${JSON.stringify(moduleId)};`;
|
|
11
10
|
};
|
|
12
|
-
//#endregion
|
|
13
11
|
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.3-
|
|
3
|
+
"version": "4.4.3-29621635.a4e85d14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
28
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.3-
|
|
29
|
-
"@vue/compiler-sfc": "3.5.
|
|
30
|
-
"autoprefixer": "^10.
|
|
28
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.3-29621635.a4e85d14",
|
|
29
|
+
"@vue/compiler-sfc": "3.5.33",
|
|
30
|
+
"autoprefixer": "^10.5.0",
|
|
31
31
|
"css-loader": "^7.1.4",
|
|
32
32
|
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
33
|
-
"cssnano": "^7.1.
|
|
34
|
-
"defu": "^6.1.
|
|
35
|
-
"esbuild-loader": "^4.4.
|
|
33
|
+
"cssnano": "^7.1.7",
|
|
34
|
+
"defu": "^6.1.7",
|
|
35
|
+
"esbuild-loader": "^4.4.3",
|
|
36
36
|
"escape-string-regexp": "^5.0.0",
|
|
37
37
|
"exsolve": "^1.0.8",
|
|
38
38
|
"file-loader": "^6.2.0",
|
|
@@ -40,46 +40,46 @@
|
|
|
40
40
|
"jiti": "^2.6.1",
|
|
41
41
|
"knitwork": "^1.3.0",
|
|
42
42
|
"magic-string": "^0.30.21",
|
|
43
|
-
"memfs": "^4.
|
|
44
|
-
"mini-css-extract-plugin": "^2.10.
|
|
45
|
-
"mlly": "^1.8.
|
|
43
|
+
"memfs": "^4.57.2",
|
|
44
|
+
"mini-css-extract-plugin": "^2.10.2",
|
|
45
|
+
"mlly": "^1.8.2",
|
|
46
46
|
"ohash": "^2.0.11",
|
|
47
47
|
"pathe": "^2.0.3",
|
|
48
48
|
"pify": "^6.1.0",
|
|
49
|
-
"postcss": "^8.5.
|
|
49
|
+
"postcss": "^8.5.12",
|
|
50
50
|
"postcss-import": "^16.1.1",
|
|
51
51
|
"postcss-import-resolver": "^2.0.0",
|
|
52
52
|
"postcss-loader": "^8.2.1",
|
|
53
53
|
"postcss-url": "^10.1.3",
|
|
54
54
|
"pug-plain-loader": "^1.1.0",
|
|
55
|
-
"seroval": "^1.5.
|
|
55
|
+
"seroval": "^1.5.2",
|
|
56
56
|
"time-fix-plugin": "^2.0.7",
|
|
57
|
-
"tinyglobby": "^0.2.
|
|
57
|
+
"tinyglobby": "^0.2.16",
|
|
58
58
|
"ufo": "^1.6.3",
|
|
59
59
|
"unenv": "^2.0.0-rc.24",
|
|
60
60
|
"unplugin": "^3.0.0",
|
|
61
61
|
"url-loader": "^4.1.1",
|
|
62
62
|
"vue-bundle-renderer": "^2.2.0",
|
|
63
63
|
"vue-loader": "^17.4.2",
|
|
64
|
-
"webpack": "^5.
|
|
65
|
-
"webpack-bundle-analyzer": "^5.
|
|
64
|
+
"webpack": "^5.106.2",
|
|
65
|
+
"webpack-bundle-analyzer": "^5.3.0",
|
|
66
66
|
"webpack-dev-middleware": "^7.4.5",
|
|
67
67
|
"webpack-hot-middleware": "^2.26.1",
|
|
68
68
|
"webpackbar": "^7.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.3-
|
|
72
|
-
"@rspack/core": "1.7.
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.3-29621635.a4e85d14",
|
|
72
|
+
"@rspack/core": "1.7.11",
|
|
73
73
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
74
74
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
75
75
|
"h3": "1.15.6",
|
|
76
|
-
"h3-next": "npm:h3@2.0.1-rc.
|
|
77
|
-
"obuild": "0.4.
|
|
78
|
-
"rollup": "4.
|
|
79
|
-
"vue": "3.5.
|
|
76
|
+
"h3-next": "npm:h3@2.0.1-rc.20",
|
|
77
|
+
"obuild": "0.4.33",
|
|
78
|
+
"rollup": "4.60.2",
|
|
79
|
+
"vue": "3.5.33"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"nuxt": "npm:nuxt-nightly@4.4.3-
|
|
82
|
+
"nuxt": "npm:nuxt-nightly@4.4.3-29621635.a4e85d14",
|
|
83
83
|
"vue": "^3.3.4"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|