@unpackjs/plugin-react 3.2.0 → 3.2.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.
package/dist/index.cjs
CHANGED
|
@@ -31,8 +31,6 @@ const core_namespaceObject = require("@unpackjs/core"), external_node_fs_namespa
|
|
|
31
31
|
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
|
32
32
|
const external_node_http_namespaceObject = require("node:http");
|
|
33
33
|
var external_node_http_default = __webpack_require__.n(external_node_http_namespaceObject);
|
|
34
|
-
const external_launch_editor_namespaceObject = require("launch-editor");
|
|
35
|
-
var external_launch_editor_default = __webpack_require__.n(external_launch_editor_namespaceObject);
|
|
36
34
|
const createServer = ()=>new Promise((resolve)=>{
|
|
37
35
|
let server = external_node_http_default().createServer((req, res)=>{
|
|
38
36
|
let params = new URLSearchParams(req.url.slice(1)), file = decodeURIComponent(params.get('file')), line = Number(params.get('line')), column = Number(params.get('column'));
|
|
@@ -41,7 +39,7 @@ const createServer = ()=>new Promise((resolve)=>{
|
|
|
41
39
|
'Access-Control-Allow-Methods': '*',
|
|
42
40
|
'Access-Control-Allow-Headers': '*',
|
|
43
41
|
'Access-Control-Allow-Private-Network': 'true'
|
|
44
|
-
}), res.end('ok'),
|
|
42
|
+
}), res.end('ok'), (0, core_namespaceObject.launchEditor)(`${file}:${line}:${column}`);
|
|
45
43
|
});
|
|
46
44
|
(0, core_namespaceObject.getPort)().then((port)=>{
|
|
47
45
|
server.listen(port, ()=>{
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,9 @@ import { fileURLToPath as __webpack_fileURLToPath__ } from "node:url";
|
|
|
4
4
|
import { dirname as __webpack_dirname__ } from "node:path";
|
|
5
5
|
import node_path from "node:path";
|
|
6
6
|
import plugin_react_refresh from "@rspack/plugin-react-refresh";
|
|
7
|
-
import { TEMPLATE_CONTENT, TEMP_DIR, addRestartCleaner, colors, esVersionToBrowserslist, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, logger, mergeConfig as core_mergeConfig, removeDir, rspack } from "@unpackjs/core";
|
|
7
|
+
import { TEMPLATE_CONTENT, TEMP_DIR, addRestartCleaner, colors, esVersionToBrowserslist, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, launchEditor, logger, mergeConfig as core_mergeConfig, removeDir, rspack } from "@unpackjs/core";
|
|
8
8
|
import node_fs from "node:fs";
|
|
9
9
|
import node_http from "node:http";
|
|
10
|
-
import launch_editor from "launch-editor";
|
|
11
10
|
var click_to_component_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
|
|
12
11
|
let applyClickToComponentConfig = async ({ config, unpackConfig })=>{
|
|
13
12
|
let { port } = await new Promise((resolve)=>{
|
|
@@ -18,7 +17,7 @@ let applyClickToComponentConfig = async ({ config, unpackConfig })=>{
|
|
|
18
17
|
'Access-Control-Allow-Methods': '*',
|
|
19
18
|
'Access-Control-Allow-Headers': '*',
|
|
20
19
|
'Access-Control-Allow-Private-Network': 'true'
|
|
21
|
-
}), res.end('ok'),
|
|
20
|
+
}), res.end('ok'), launchEditor(`${file}:${line}:${column}`);
|
|
22
21
|
});
|
|
23
22
|
getPort().then((port)=>{
|
|
24
23
|
server.listen(port, ()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/click-to-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/click-to-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,oBAAoB,EAKzB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AA4BvB,eAAO,MAAM,2BAA2B,GAAU,2BAG/C;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,oBAAoB,CA+B/B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/plugin-react",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "React plugin for Unpack",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -27,11 +27,10 @@
|
|
|
27
27
|
"@rspack/plugin-react-refresh": "1.5.1",
|
|
28
28
|
"@svgr/webpack": "8.1.0",
|
|
29
29
|
"@swc/helpers": "0.5.17",
|
|
30
|
-
"
|
|
31
|
-
"react-refresh": "0.17.0"
|
|
30
|
+
"react-refresh": "0.18.0"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@unpackjs/core": "3.3.
|
|
33
|
+
"@unpackjs/core": "3.3.4"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {
|
|
37
36
|
"@unpackjs/core": "3.x"
|