@nuxt/webpack-builder-nightly 5.0.0-29644680.78bc1fc6 → 5.0.0-29650370.d985bf09

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
@@ -6,7 +6,7 @@ import { defu } from "defu";
6
6
  import { joinURL, withTrailingSlash } from "ufo";
7
7
  import { directoryToURL, logger, resolveAlias, useNitro, useNuxt } from "@nuxt/kit";
8
8
  import { createUnplugin } from "unplugin";
9
- import MagicString from "magic-string";
9
+ import { generateTransform, rolldownString } from "rolldown-string";
10
10
  import { MiniCssExtractPlugin, TsCheckerPlugin, WebpackBarPlugin, builder, webpack } from "#builder";
11
11
  import { existsSync, readFileSync } from "node:fs";
12
12
  import { basename, isAbsolute, join, normalize, relative, resolve } from "pathe";
@@ -31,16 +31,8 @@ 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
- const defaults = {
35
- globalPublicPath: "__webpack_public_path__",
36
- sourcemap: true
37
- };
38
34
  const ENTRY_RE = /import ["']#build\/css["'];/;
39
- const DynamicBasePlugin = createUnplugin((options = {}) => {
40
- options = {
41
- ...defaults,
42
- ...options
43
- };
35
+ const DynamicBasePlugin = createUnplugin(() => {
44
36
  return {
45
37
  name: "nuxt:dynamic-base-path",
46
38
  enforce: "post",
@@ -49,13 +41,10 @@ const DynamicBasePlugin = createUnplugin((options = {}) => {
49
41
  id: { include: /entry/ },
50
42
  code: { include: ENTRY_RE }
51
43
  },
52
- handler(code) {
53
- const s = new MagicString(code);
54
- s.prepend(`import { buildAssetsURL } from '#internal/nuxt/paths';\n${options.globalPublicPath} = buildAssetsURL();\n`);
55
- return {
56
- code: s.toString(),
57
- map: options.sourcemap ? s.generateMap({ hires: true }) : void 0
58
- };
44
+ handler(code, id, meta) {
45
+ const s = rolldownString(code, id, meta);
46
+ s.prepend(`import { buildAssetsURL } from '#internal/nuxt/paths';\n__webpack_public_path__ = buildAssetsURL();\n`);
47
+ return generateTransform(s, id);
59
48
  }
60
49
  }
61
50
  };
@@ -1358,7 +1347,7 @@ const bundle = async (nuxt) => {
1358
1347
  const mfs = nuxt.options.dev ? createMFS() : null;
1359
1348
  const ssrStylesPlugin = nuxt.options.ssr && !nuxt.options.dev ? new SSRStylesPlugin(nuxt) : null;
1360
1349
  for (const config of webpackConfigs) {
1361
- config.plugins.push(DynamicBasePlugin.webpack({ sourcemap: !!nuxt.options.sourcemap[config.name] }));
1350
+ config.plugins.push(DynamicBasePlugin.webpack());
1362
1351
  if (config.name === "client" && nuxt.options.experimental.emitRouteChunkError && nuxt.options.builder !== "@nuxt/rspack-builder") config.plugins.push(new ChunkErrorPlugin());
1363
1352
  if (ssrStylesPlugin) config.plugins.push(ssrStylesPlugin);
1364
1353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder-nightly",
3
- "version": "5.0.0-29644680.78bc1fc6",
3
+ "version": "5.0.0-29650370.d985bf09",
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@5.0.0-29644680.78bc1fc6",
28
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29650370.d985bf09",
29
29
  "@vue/compiler-sfc": "3.5.34",
30
30
  "autoprefixer": "^10.5.0",
31
31
  "css-loader": "^7.1.4",
@@ -39,7 +39,6 @@
39
39
  "fork-ts-checker-webpack-plugin": "^9.1.0",
40
40
  "jiti": "^2.7.0",
41
41
  "knitwork": "^1.3.0",
42
- "magic-string": "^0.30.21",
43
42
  "memfs": "^4.57.2",
44
43
  "mini-css-extract-plugin": "^2.10.2",
45
44
  "mlly": "^1.8.2",
@@ -52,6 +51,7 @@
52
51
  "postcss-loader": "^8.2.1",
53
52
  "postcss-url": "^10.1.3",
54
53
  "pug-plain-loader": "^1.1.0",
54
+ "rolldown-string": "^0.3.0",
55
55
  "seroval": "^1.5.4",
56
56
  "time-fix-plugin": "^2.0.7",
57
57
  "tinyglobby": "^0.2.16",
@@ -68,18 +68,18 @@
68
68
  "webpackbar": "^7.0.0"
69
69
  },
70
70
  "devDependencies": {
71
- "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29644680.78bc1fc6",
71
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29650370.d985bf09",
72
72
  "@rspack/core": "2.0.2",
73
73
  "@types/webpack-bundle-analyzer": "4.7.0",
74
74
  "@types/webpack-hot-middleware": "2.25.12",
75
75
  "h3": "1.15.11",
76
76
  "h3-next": "npm:h3@2.0.1-rc.22",
77
- "obuild": "0.4.33",
77
+ "obuild": "0.4.35",
78
78
  "rollup": "4.60.3",
79
79
  "vue": "3.5.34"
80
80
  },
81
81
  "peerDependencies": {
82
- "nuxt": "npm:nuxt-nightly@5.0.0-29644680.78bc1fc6",
82
+ "nuxt": "npm:nuxt-nightly@5.0.0-29650370.d985bf09",
83
83
  "vue": "^3.3.4"
84
84
  },
85
85
  "engines": {
@@ -1,33 +0,0 @@
1
- # Licenses of Bundled Dependencies
2
-
3
- The published artifact additionally contains code with the following licenses:
4
- MIT
5
-
6
- # Bundled Dependencies
7
-
8
- ## nuxt-nightly
9
-
10
- License: MIT
11
- Repository: https://github.com/nuxt/nuxt
12
-
13
- > The MIT License (MIT)
14
- >
15
- > Copyright (c) 2016-present - Nuxt Team
16
- >
17
- > Permission is hereby granted, free of charge, to any person obtaining a copy
18
- > of this software and associated documentation files (the "Software"), to deal
19
- > in the Software without restriction, including without limitation the rights
20
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- > copies of the Software, and to permit persons to whom the Software is
22
- > furnished to do so, subject to the following conditions:
23
- >
24
- > The above copyright notice and this permission notice shall be included in all
25
- > copies or substantial portions of the Software.
26
- >
27
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- > SOFTWARE.