@nuxt/webpack-builder 3.1.2 → 3.2.0

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 +23 -4
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -16,19 +16,19 @@ import { createFsFromVolume, Volume } from 'memfs';
16
16
  import VirtualModulesPlugin from 'webpack-virtual-modules';
17
17
  import querystring from 'node:querystring';
18
18
  import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
19
+ import ForkTSCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
19
20
  import { cloneDeep, defaults as defaults$1, merge, uniq } from 'lodash-es';
20
21
  import TimeFixPlugin from 'time-fix-plugin';
21
22
  import WebpackBar from 'webpackbar';
22
23
  import FriendlyErrorsWebpackPlugin from '@nuxt/friendly-errors-webpack-plugin';
23
24
  import escapeRegExp from 'escape-string-regexp';
24
- import esbuildLoader from 'esbuild-loader';
25
+ import { EsbuildPlugin } from 'esbuild-loader';
25
26
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
26
27
  import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
27
28
  import VueLoaderPlugin from 'vue-loader/dist/pluginWebpack5.js';
28
29
  import { normalizeWebpackManifest } from 'vue-bundle-renderer';
29
30
  import hash$1 from 'hash-sum';
30
31
  import fse from 'fs-extra';
31
- import ForkTSCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
32
32
 
33
33
  const keyedFunctions = [
34
34
  "useState",
@@ -471,7 +471,7 @@ function getEnv(ctx) {
471
471
  function esbuild(ctx) {
472
472
  const { config } = ctx;
473
473
  const target = ctx.isServer ? "es2019" : "chrome85";
474
- config.optimization.minimizer.push(new esbuildLoader.ESBuildMinifyPlugin());
474
+ config.optimization.minimizer.push(new EsbuildPlugin());
475
475
  config.module.rules.push(
476
476
  {
477
477
  test: /\.m?[jt]s$/i,
@@ -971,6 +971,18 @@ function clientPlugins(ctx) {
971
971
  ...options.webpack.analyze === true ? {} : options.webpack.analyze
972
972
  }));
973
973
  }
974
+ if (!ctx.nuxt.options.ssr) {
975
+ if (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev) {
976
+ config.plugins.push(new ForkTSCheckerWebpackPlugin({
977
+ logger,
978
+ typescript: {
979
+ extensions: {
980
+ vue: { compiler: "@vue/compiler-sfc" }
981
+ }
982
+ }
983
+ }));
984
+ }
985
+ }
974
986
  }
975
987
 
976
988
  function node(ctx) {
@@ -1067,7 +1079,14 @@ function serverPlugins(ctx) {
1067
1079
  }));
1068
1080
  }
1069
1081
  if (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev) {
1070
- config.plugins.push(new ForkTSCheckerWebpackPlugin({ logger }));
1082
+ config.plugins.push(new ForkTSCheckerWebpackPlugin({
1083
+ logger,
1084
+ typescript: {
1085
+ extensions: {
1086
+ vue: { compiler: "@vue/compiler-sfc" }
1087
+ }
1088
+ }
1089
+ }));
1071
1090
  }
1072
1091
  }
1073
1092
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder",
3
- "version": "3.1.2",
3
+ "version": "3.2.0",
4
4
  "repository": "nuxt/nuxt",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,12 +15,12 @@
15
15
  "dependencies": {
16
16
  "@babel/core": "^7.20.12",
17
17
  "@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
18
- "@nuxt/kit": "3.1.2",
18
+ "@nuxt/kit": "3.2.0",
19
19
  "autoprefixer": "^10.4.13",
20
20
  "css-loader": "^6.7.3",
21
21
  "css-minimizer-webpack-plugin": "^4.2.2",
22
22
  "cssnano": "^5.1.14",
23
- "esbuild-loader": "^2.21.0",
23
+ "esbuild-loader": "^3.0.0",
24
24
  "escape-string-regexp": "^5.0.0",
25
25
  "estree-walker": "^3.0.3",
26
26
  "file-loader": "^6.2.0",
@@ -44,7 +44,7 @@
44
44
  "ufo": "^1.0.1",
45
45
  "unplugin": "^1.0.1",
46
46
  "url-loader": "^4.1.1",
47
- "vue-bundle-renderer": "^1.0.0",
47
+ "vue-bundle-renderer": "^1.0.1",
48
48
  "vue-loader": "^17.0.1",
49
49
  "webpack": "^5.75.0",
50
50
  "webpack-bundle-analyzer": "^4.7.0",
@@ -54,7 +54,7 @@
54
54
  "webpackbar": "^5.0.2"
55
55
  },
56
56
  "devDependencies": {
57
- "@nuxt/schema": "3.1.2",
57
+ "@nuxt/schema": "3.2.0",
58
58
  "@types/lodash-es": "^4.17.6",
59
59
  "@types/pify": "^5.0.1",
60
60
  "@types/webpack-bundle-analyzer": "^4.6.0",