@shuvi/toolpack 1.0.8 → 1.0.10

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.
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const chalk_1 = __importDefault(require("@shuvi/utils/lib/chalk"));
12
+ const chalk_1 = __importDefault(require("@shuvi/utils/chalk"));
13
13
  const friendlySyntaxErrorLabel = 'Syntax error:';
14
14
  function isLikelyASyntaxError(message) {
15
15
  return message.indexOf(friendlySyntaxErrorLabel) !== -1;
@@ -33,7 +33,7 @@ const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin")
33
33
  const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-webpack-plugin"));
34
34
  const webpack_1 = __importDefault(require("webpack"));
35
35
  const path = __importStar(require("path"));
36
- const constants_1 = require("@shuvi/shared/lib/constants");
36
+ const constants_1 = require("@shuvi/shared/constants");
37
37
  const fix_watching_plugin_1 = __importDefault(require("../plugins/fix-watching-plugin"));
38
38
  const crypto = __importStar(require("crypto"));
39
39
  const jsconfig_paths_plugin_1 = __importDefault(require("../plugins/jsconfig-paths-plugin"));
@@ -136,6 +136,7 @@ function baseWebpackChain({ dev, outputDir, lightningCss, compiler, projectRoot,
136
136
  alias: [
137
137
  'lightningcss-loader',
138
138
  'shuvi-swc-loader',
139
+ 'empty-loader',
139
140
  'route-component-loader'
140
141
  ].reduce((alias, loader) => {
141
142
  alias[`@shuvi/${loader}`] = resolveLocalLoader(loader);
@@ -31,7 +31,7 @@ const crypto = __importStar(require("crypto"));
31
31
  const webpack_1 = __importDefault(require("webpack"));
32
32
  const path = __importStar(require("path"));
33
33
  const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
34
- const resolve_1 = require("@shuvi/utils/lib/resolve");
34
+ const resolve_1 = require("@shuvi/utils/resolve");
35
35
  const base_1 = require("./base");
36
36
  const style_1 = require("./parts/style");
37
37
  const helpers_1 = require("./parts/helpers");
@@ -72,7 +72,7 @@ function createBrowserWebpackChain(options) {
72
72
  typescript: {
73
73
  configFile: path.join(projectRoot, 'tsconfig.json'),
74
74
  mode: 'write-references',
75
- typeScriptPath: jsConfig.typeScriptPath,
75
+ typescriptPath: jsConfig.typeScriptPath,
76
76
  diagnosticOptions: {
77
77
  syntactic: true
78
78
  },
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.commonChunkFilename = exports.splitChunksFilter = exports.shouldUseRelativeAssetPaths = exports.addExternals = exports.checkWebpackExternals = void 0;
7
- const invariant_1 = __importDefault(require("@shuvi/utils/lib/invariant"));
7
+ const invariant_1 = __importDefault(require("@shuvi/utils/invariant"));
8
8
  const externalsFunctionMap = new WeakMap();
9
9
  const checkWebpackExternals = (webpackChain) => {
10
10
  let externals = webpackChain.get('externals');
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.withStyle = void 0;
30
- const constants_1 = require("@shuvi/shared/lib/constants");
30
+ const constants_1 = require("@shuvi/shared/constants");
31
31
  const Rule_1 = __importDefault(require("webpack-chain/src/Rule"));
32
32
  const mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
33
33
  const loaderUtils = __importStar(require("loader-utils"));
@@ -17,7 +17,7 @@ const fs_extra_1 = require("fs-extra");
17
17
  const path_1 = require("path");
18
18
  const mrmime_1 = require("mrmime");
19
19
  const webpack_virtual_modules_1 = __importDefault(require("webpack-virtual-modules"));
20
- const invariant_1 = __importDefault(require("@shuvi/utils/lib/invariant"));
20
+ const invariant_1 = __importDefault(require("@shuvi/utils/invariant"));
21
21
  const constants_1 = require("./constants");
22
22
  const bundler_1 = require("./bundler");
23
23
  const dynamic_dll_plugin_1 = require("./plugin/dynamic-dll-plugin");
@@ -0,0 +1,2 @@
1
+ import { PitchLoaderDefinitionFunction } from 'webpack';
2
+ export declare const pitch: PitchLoaderDefinitionFunction<{}>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pitch = void 0;
4
+ const pitch = function () {
5
+ return `export {}`;
6
+ };
7
+ exports.pitch = pitch;
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.raw = void 0;
16
16
  const querystring_1 = __importDefault(require("querystring"));
17
- const constants_1 = require("@shuvi/shared/lib/constants");
17
+ const constants_1 = require("@shuvi/shared/constants");
18
18
  const compiler_1 = require("@shuvi/compiler");
19
19
  const getLoaderSWCOptions_1 = __importDefault(require("./getLoaderSWCOptions"));
20
20
  function loaderTransform(source, inputSourceMap) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const webpack_1 = require("webpack");
4
- const constants_1 = require("@shuvi/shared/lib/constants");
4
+ const constants_1 = require("@shuvi/shared/constants");
5
5
  const IDENTITY_RUNTIME_PUBLICPATH = `__${constants_1.NAME}_dynamic_public_path__`;
6
6
  const GLOBALTHIS = 'globalThis';
7
7
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/toolpack",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/shuvijs/shuvi.git",
@@ -17,10 +17,10 @@
17
17
  "build": "tsc -p tsconfig.build.json"
18
18
  },
19
19
  "engines": {
20
- "node": ">= 12.0.0"
20
+ "node": ">= 16.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@shuvi/compiler": "1.0.8",
23
+ "@shuvi/compiler": "1.0.10",
24
24
  "@babel/core": "7.12.10",
25
25
  "@babel/plugin-proposal-class-properties": "7.12.1",
26
26
  "@babel/plugin-proposal-nullish-coalescing-operator": "7.10.1",
@@ -35,8 +35,8 @@
35
35
  "@babel/preset-typescript": "7.12.7",
36
36
  "@babel/runtime": "7.12.5",
37
37
  "lightningcss": "1.15.0",
38
- "@shuvi/shared": "1.0.8",
39
- "@shuvi/utils": "1.0.8",
38
+ "@shuvi/shared": "1.0.10",
39
+ "@shuvi/utils": "1.0.10",
40
40
  "babel-loader": "8.2.2",
41
41
  "babel-plugin-syntax-jsx": "6.18.0",
42
42
  "babel-plugin-transform-define": "2.0.0",
@@ -69,7 +69,7 @@
69
69
  "stream-browserify": "3.0.0",
70
70
  "style-loader": "2.0.0",
71
71
  "terser-webpack-plugin": "5.2.5",
72
- "typescript": "4.7.4",
72
+ "typescript": "4.8.4",
73
73
  "vm-browserify": "1.1.2",
74
74
  "webpack": "5.73.0",
75
75
  "webpack-bundle-analyzer": "4.3.0",