@nuxt/webpack-builder 3.11.1 → 3.11.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -2
  2. package/package.json +15 -15
package/dist/index.mjs CHANGED
@@ -274,17 +274,18 @@ const defaults = {
274
274
  globalPublicPath: "__webpack_public_path__",
275
275
  sourcemap: true
276
276
  };
277
+ const ENTRY_RE = /import ["']#build\/css["'];/;
277
278
  const DynamicBasePlugin = createUnplugin((options = {}) => {
278
279
  options = { ...defaults, ...options };
279
280
  return {
280
281
  name: "nuxt:dynamic-base-path",
281
282
  enforce: "post",
282
283
  transform(code, id) {
283
- if (!id.includes("paths.mjs") || !code.includes("const appConfig = ")) {
284
+ if (!id.includes("entry") || !ENTRY_RE.test(code)) {
284
285
  return;
285
286
  }
286
287
  const s = new MagicString(code);
287
- s.append(`
288
+ s.prepend(`import { buildAssetsURL } from '#internal/nuxt/paths';
288
289
  ${options.globalPublicPath} = buildAssetsURL();
289
290
  `);
290
291
  return {
@@ -535,6 +536,7 @@ function baseAlias(ctx) {
535
536
  "#app": ctx.options.appDir,
536
537
  "#build/plugins": resolve(ctx.options.buildDir, "plugins", ctx.isClient ? "client" : "server"),
537
538
  "#build": ctx.options.buildDir,
539
+ "#internal/nuxt/paths": resolve(ctx.nuxt.options.buildDir, "paths.mjs"),
538
540
  ...ctx.options.alias,
539
541
  ...ctx.alias
540
542
  };
@@ -1233,6 +1235,9 @@ function serverStandalone(ctx) {
1233
1235
  ...ctx.options.build.transpile
1234
1236
  ];
1235
1237
  const external = ["#internal/nitro"];
1238
+ if (!ctx.nuxt.options.dev) {
1239
+ external.push("#internal/nuxt/paths");
1240
+ }
1236
1241
  if (!Array.isArray(ctx.config.externals)) {
1237
1242
  return;
1238
1243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder",
3
- "version": "3.11.1",
3
+ "version": "3.11.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -23,10 +23,10 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
26
- "autoprefixer": "^10.4.18",
27
- "css-loader": "^6.10.0",
26
+ "autoprefixer": "^10.4.19",
27
+ "css-loader": "^6.11.0",
28
28
  "css-minimizer-webpack-plugin": "^6.0.0",
29
- "cssnano": "^6.1.0",
29
+ "cssnano": "^6.1.2",
30
30
  "defu": "^6.1.4",
31
31
  "esbuild-loader": "^4.1.0",
32
32
  "escape-string-regexp": "^5.0.0",
@@ -37,34 +37,34 @@
37
37
  "h3": "^1.11.1",
38
38
  "hash-sum": "^2.0.0",
39
39
  "lodash-es": "4.17.21",
40
- "magic-string": "^0.30.8",
41
- "memfs": "^4.7.7",
40
+ "magic-string": "^0.30.9",
41
+ "memfs": "^4.8.1",
42
42
  "mini-css-extract-plugin": "^2.8.1",
43
43
  "mlly": "^1.6.1",
44
44
  "ohash": "^1.1.3",
45
45
  "pathe": "^1.1.2",
46
46
  "pify": "^6.1.0",
47
- "postcss": "^8.4.36",
48
- "postcss-import": "^16.0.1",
47
+ "postcss": "^8.4.38",
48
+ "postcss-import": "^16.1.0",
49
49
  "postcss-import-resolver": "^2.0.0",
50
50
  "postcss-loader": "^8.1.1",
51
51
  "postcss-url": "^10.1.3",
52
52
  "pug-plain-loader": "^1.1.0",
53
53
  "std-env": "^3.7.0",
54
54
  "time-fix-plugin": "^2.0.7",
55
- "ufo": "^1.5.2",
55
+ "ufo": "^1.5.3",
56
56
  "unenv": "^1.9.0",
57
- "unplugin": "^1.10.0",
57
+ "unplugin": "^1.10.1",
58
58
  "url-loader": "^4.1.1",
59
59
  "vue-bundle-renderer": "^2.0.0",
60
60
  "vue-loader": "^17.4.2",
61
- "webpack": "^5.90.3",
61
+ "webpack": "^5.91.0",
62
62
  "webpack-bundle-analyzer": "^4.10.1",
63
- "webpack-dev-middleware": "^7.0.0",
63
+ "webpack-dev-middleware": "^7.2.1",
64
64
  "webpack-hot-middleware": "^2.26.1",
65
65
  "webpack-virtual-modules": "^0.6.1",
66
66
  "webpackbar": "^6.0.1",
67
- "@nuxt/kit": "3.11.1"
67
+ "@nuxt/kit": "3.11.2"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/fs-extra": "11.0.4",
@@ -72,10 +72,10 @@
72
72
  "@types/pify": "5.0.4",
73
73
  "@types/webpack-bundle-analyzer": "4.7.0",
74
74
  "@types/webpack-hot-middleware": "2.25.9",
75
- "@types/webpack-virtual-modules": "0.1.3",
75
+ "@types/webpack-virtual-modules": "0.4.2",
76
76
  "unbuild": "latest",
77
77
  "vue": "3.4.21",
78
- "@nuxt/schema": "3.11.1"
78
+ "@nuxt/schema": "3.11.2"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "vue": "^3.3.4"