@nuxt/webpack-builder 3.8.0 → 3.8.1

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 +19 -4
  2. package/package.json +9 -8
package/dist/index.mjs CHANGED
@@ -19,7 +19,7 @@ import VirtualModulesPlugin from 'webpack-virtual-modules';
19
19
  import querystring from 'node:querystring';
20
20
  import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
21
21
  import ForkTSCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
22
- import { klona } from 'klona';
22
+ import { cloneDeep } from 'lodash-es';
23
23
  import TimeFixPlugin from 'time-fix-plugin';
24
24
  import WebpackBar from 'webpackbar';
25
25
  import FriendlyErrorsWebpackPlugin from '@nuxt/friendly-errors-webpack-plugin';
@@ -27,6 +27,7 @@ import { isTest } from 'std-env';
27
27
  import { EsbuildPlugin } from 'esbuild-loader';
28
28
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
29
29
  import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
30
+ import createResolver from 'postcss-import-resolver';
30
31
  import VueLoaderPlugin from 'vue-loader/dist/pluginWebpack5.js';
31
32
  import { normalizeWebpackManifest } from 'vue-bundle-renderer';
32
33
  import hash$1 from 'hash-sum';
@@ -383,7 +384,7 @@ function fileName(ctx, key) {
383
384
  return fileName2;
384
385
  }
385
386
  function getWebpackConfig(ctx) {
386
- return klona(ctx.config);
387
+ return cloneDeep(ctx.config);
387
388
  }
388
389
 
389
390
  function assets(ctx) {
@@ -714,6 +715,21 @@ const getPostcssConfig = (nuxt) => {
714
715
  return false;
715
716
  }
716
717
  const postcssOptions = defu({}, nuxt.options.postcss, {
718
+ plugins: {
719
+ /**
720
+ * https://github.com/postcss/postcss-import
721
+ */
722
+ "postcss-import": {
723
+ resolve: createResolver({
724
+ alias: { ...nuxt.options.alias },
725
+ modules: nuxt.options.modulesDir
726
+ })
727
+ },
728
+ /**
729
+ * https://github.com/postcss/postcss-url
730
+ */
731
+ "postcss-url": {}
732
+ },
717
733
  sourceMap: nuxt.options.webpack.cssSourceMap,
718
734
  // Array, String or Function
719
735
  order: "autoprefixerAndCssnanoLast"
@@ -1108,7 +1124,7 @@ function clientHMR(ctx) {
1108
1124
  function clientOptimization(_ctx) {
1109
1125
  }
1110
1126
  function clientPlugins(ctx) {
1111
- if (!ctx.isDev && ctx.name === "client" && ctx.userConfig.analyze) {
1127
+ if (!ctx.isDev && ctx.name === "client" && ctx.userConfig.analyze && (ctx.userConfig.analyze === true || ctx.userConfig.analyze.enabled)) {
1112
1128
  const statsDir = resolve(ctx.options.analyzeDir);
1113
1129
  ctx.config.plugins.push(new BundleAnalyzerPlugin({
1114
1130
  analyzerMode: "static",
@@ -1171,7 +1187,6 @@ function server(ctx) {
1171
1187
  serverPreset,
1172
1188
  serverPlugins
1173
1189
  ]);
1174
- return getWebpackConfig(ctx);
1175
1190
  }
1176
1191
  function serverPreset(ctx) {
1177
1192
  ctx.config.output.filename = "server.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "repository": "nuxt/nuxt",
5
5
  "description": "Webpack bundler for Nuxt",
6
6
  "license": "MIT",
@@ -22,16 +22,16 @@
22
22
  "css-loader": "^6.8.1",
23
23
  "css-minimizer-webpack-plugin": "^5.0.1",
24
24
  "cssnano": "^6.0.1",
25
- "defu": "^6.1.2",
25
+ "defu": "^6.1.3",
26
26
  "esbuild-loader": "^4.0.2",
27
27
  "escape-string-regexp": "^5.0.0",
28
28
  "estree-walker": "^3.0.3",
29
29
  "file-loader": "^6.2.0",
30
- "fork-ts-checker-webpack-plugin": "^9.0.0",
30
+ "fork-ts-checker-webpack-plugin": "^9.0.2",
31
31
  "fs-extra": "^11.1.1",
32
32
  "h3": "^1.8.2",
33
33
  "hash-sum": "^2.0.0",
34
- "klona": "^2.0.6",
34
+ "lodash-es": "4.17.21",
35
35
  "magic-string": "^0.30.5",
36
36
  "memfs": "^4.6.0",
37
37
  "mini-css-extract-plugin": "^2.7.6",
@@ -41,6 +41,7 @@
41
41
  "pify": "^6.1.0",
42
42
  "postcss": "^8.4.31",
43
43
  "postcss-import": "^15.1.0",
44
+ "postcss-import-resolver": "^2.0.0",
44
45
  "postcss-loader": "^7.3.3",
45
46
  "postcss-url": "^10.1.3",
46
47
  "pug-plain-loader": "^1.1.0",
@@ -50,14 +51,14 @@
50
51
  "unplugin": "^1.5.0",
51
52
  "url-loader": "^4.1.1",
52
53
  "vue-bundle-renderer": "^2.0.0",
53
- "vue-loader": "^17.3.0",
54
+ "vue-loader": "^17.3.1",
54
55
  "webpack": "^5.89.0",
55
56
  "webpack-bundle-analyzer": "^4.9.1",
56
57
  "webpack-dev-middleware": "^6.1.1",
57
58
  "webpack-hot-middleware": "^2.25.4",
58
59
  "webpack-virtual-modules": "^0.6.0",
59
60
  "webpackbar": "^5.0.2",
60
- "@nuxt/kit": "3.8.0"
61
+ "@nuxt/kit": "3.8.1"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/fs-extra": "11.0.3",
@@ -67,8 +68,8 @@
67
68
  "@types/webpack-hot-middleware": "2.25.8",
68
69
  "@types/webpack-virtual-modules": "0.1.3",
69
70
  "unbuild": "latest",
70
- "vue": "3.3.4",
71
- "@nuxt/schema": "3.8.0"
71
+ "vue": "3.3.8",
72
+ "@nuxt/schema": "3.8.1"
72
73
  },
73
74
  "peerDependencies": {
74
75
  "vue": "^3.3.4"