@sleetch/next 1.0.7 → 1.0.8
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/lib/wepack-plugin.d.ts +0 -1
- package/dist/lib/wepack-plugin.js +6 -2
- package/package.json +29 -29
|
@@ -2,13 +2,17 @@ import { sleetch_runtime } from "@sleetch/core/compiler";
|
|
|
2
2
|
//#region src/lib/wepack-plugin.ts
|
|
3
3
|
const runtime = new sleetch_runtime();
|
|
4
4
|
var sleetch_webpack_plugin = class {
|
|
5
|
-
constructor() {}
|
|
6
5
|
apply(compiler) {
|
|
7
6
|
compiler.hooks.beforeCompile.tapPromise("SleetchWebpackPlugin", async () => {
|
|
8
7
|
if (!runtime.sources.loaded()) {
|
|
9
8
|
await runtime.sources.load();
|
|
10
9
|
await runtime.builder.build();
|
|
11
|
-
if (compiler.options.mode === "development")
|
|
10
|
+
if (compiler.options.mode === "development") {
|
|
11
|
+
await runtime.sources.watch();
|
|
12
|
+
runtime.watcher.on("edited", async (a, b) => {
|
|
13
|
+
compiler.watching?.invalidate();
|
|
14
|
+
});
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
});
|
|
14
18
|
}
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
"name": "@sleetch/next",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsdown",
|
|
13
|
+
"dev": "tsdown --watch"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/index.js",
|
|
17
|
+
"./lib/plugin": "./dist/lib/plugin.js",
|
|
18
|
+
"./lib/wepack-plugin": "./dist/lib/wepack-plugin.js",
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@sleetch/core": "1.0.8"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"next": "^16.0.0",
|
|
26
|
+
"@types/webpack": "^5.28.5"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"next": "^16.2.12"
|
|
30
|
+
}
|
|
31
31
|
}
|