@shuvi/toolpack 2.0.0-dev.6 → 2.0.0-dev.7
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/lib/webpack/index.js
CHANGED
|
@@ -28,7 +28,5 @@ function resolveRspackModule(path) {
|
|
|
28
28
|
console.error('path need startWith "@rspack/core/" to resolve rspack module');
|
|
29
29
|
}
|
|
30
30
|
const p = require(`${rspackResolveContext}/${path}`);
|
|
31
|
-
// debug
|
|
32
|
-
console.debug(`[rspack][resolveRspackModule] ${path} -> ${p}`);
|
|
33
31
|
return p;
|
|
34
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './plugin.rspack';
|
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(
|
|
7
|
+
var plugin_rspack_1 = require("./plugin.rspack");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(plugin_rspack_1).default; } });
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ref: https://github.com/vercel/next.js/blob/canary/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
const Rspack = __importStar(require("../../webpack"));
|
|
4
28
|
const fs_1 = require("fs");
|
|
5
29
|
function deleteCache(filePath) {
|
|
6
30
|
try {
|
|
@@ -25,8 +49,7 @@ class RequireCacheHotReloader {
|
|
|
25
49
|
compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
|
|
26
50
|
compilation.hooks.additionalTreeRuntimeRequirements.tap(PLUGIN_NAME, (_chunk, runtimeRequirements) => {
|
|
27
51
|
// add this so that the server.js would be emitted after every compilation
|
|
28
|
-
|
|
29
|
-
runtimeRequirements.add(RuntimeGlobals.getFullHash);
|
|
52
|
+
runtimeRequirements.add(Rspack.RuntimeGlobals.getFullHash);
|
|
30
53
|
});
|
|
31
54
|
});
|
|
32
55
|
compiler.hooks.assetEmitted.tap(PLUGIN_NAME, (_file, { targetPath }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/toolpack",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"node": ">= 16.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@shuvi/compiler": "2.0.0-dev.6",
|
|
24
23
|
"@babel/core": "7.12.10",
|
|
25
24
|
"@babel/plugin-proposal-class-properties": "7.12.1",
|
|
26
25
|
"@babel/plugin-proposal-nullish-coalescing-operator": "7.10.1",
|
|
@@ -34,9 +33,13 @@
|
|
|
34
33
|
"@babel/preset-react": "7.10.1",
|
|
35
34
|
"@babel/preset-typescript": "7.12.7",
|
|
36
35
|
"@babel/runtime": "7.12.5",
|
|
37
|
-
"
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
36
|
+
"@rspack/cli": "^1.4.2",
|
|
37
|
+
"@rspack/core": "^1.4.2",
|
|
38
|
+
"@rspack/plugin-html": "^0.5.8",
|
|
39
|
+
"@shuvi/compiler": "2.0.0-dev.7",
|
|
40
|
+
"@shuvi/shared": "2.0.0-dev.7",
|
|
41
|
+
"@shuvi/utils": "2.0.0-dev.7",
|
|
42
|
+
"@swc/helpers": "0.4.3",
|
|
40
43
|
"babel-loader": "8.2.2",
|
|
41
44
|
"babel-plugin-syntax-jsx": "6.18.0",
|
|
42
45
|
"babel-plugin-transform-define": "2.0.0",
|
|
@@ -53,6 +56,7 @@
|
|
|
53
56
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
54
57
|
"fs-extra": "9.0.1",
|
|
55
58
|
"ignore-loader": "0.1.2",
|
|
59
|
+
"lightningcss": "1.19.0",
|
|
56
60
|
"loader-utils": "3.0.0",
|
|
57
61
|
"mini-css-extract-plugin": "1.3.9",
|
|
58
62
|
"mrmime": "1.0.0",
|
|
@@ -63,23 +67,19 @@
|
|
|
63
67
|
"postcss-preset-env": "6.7.0",
|
|
64
68
|
"process": "0.11.10",
|
|
65
69
|
"regenerator-runtime": "0.13.9",
|
|
66
|
-
"
|
|
70
|
+
"rspack-chain": "1.2.6",
|
|
67
71
|
"sass-loader": "10.1.0",
|
|
68
72
|
"stream-browserify": "3.0.0",
|
|
69
73
|
"style-loader": "2.0.0",
|
|
70
74
|
"terser-webpack-plugin": "5.2.5",
|
|
75
|
+
"ts-checker-rspack-plugin": "^1.1.4",
|
|
71
76
|
"typescript": "5.5.2",
|
|
72
77
|
"vm-browserify": "1.1.2",
|
|
73
78
|
"webpack": "5.73.0",
|
|
74
79
|
"webpack-bundle-analyzer": "4.3.0",
|
|
75
80
|
"webpack-chain": "6.5.1",
|
|
76
81
|
"webpack-sources": "2.2.0",
|
|
77
|
-
"webpack-virtual-modules": "0.4.3"
|
|
78
|
-
"rspack-chain": "^1.2.5",
|
|
79
|
-
"@rspack/cli": "^1.3.15",
|
|
80
|
-
"@rspack/core": "^1.4.0",
|
|
81
|
-
"@rspack/plugin-html": "^0.5.8",
|
|
82
|
-
"ts-checker-rspack-plugin": "^1.1.4"
|
|
82
|
+
"webpack-virtual-modules": "0.4.3"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/babel__core": "^7.1.19",
|