@modern-js/node-bundle-require 2.2.0 → 2.4.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.
- package/CHANGELOG.md +21 -0
- package/README.md +14 -18
- package/dist/js/modern/index.js +1 -9
- package/dist/js/node/index.js +1 -9
- package/package.json +5 -5
- package/dist/js/modern/modern-app-env.d.js +0 -0
- package/dist/js/node/modern-app-env.d.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @modern-js/node-bundle-require
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 98a2733: fix(tailwind): fix webpack cache not work when using twin.macro
|
|
8
|
+
|
|
9
|
+
fix(tailwind): 修复使用 twin.macro 时 webpack 缓存不生效的问题
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [98a2733]
|
|
12
|
+
- Updated dependencies [8c2db5f]
|
|
13
|
+
- @modern-js/utils@2.4.0
|
|
14
|
+
|
|
15
|
+
## 2.3.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [fd5a3ed]
|
|
20
|
+
- Updated dependencies [6ca1c0b]
|
|
21
|
+
- Updated dependencies [89b6739]
|
|
22
|
+
- @modern-js/utils@2.3.0
|
|
23
|
+
|
|
3
24
|
## 2.2.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
|
4
3
|
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Modern.js</h1>
|
|
6
|
+
|
|
5
7
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<br/>
|
|
8
|
-
<a href="https://modernjs.dev" target="blank">
|
|
9
|
-
modernjs.dev
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
<p align="center">
|
|
13
|
-
The meta-framework suite designed from scratch for frontend-focused modern web development
|
|
8
|
+
A Progressive React Framework for modern web development.
|
|
14
9
|
</p>
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
11
|
+
## Getting Started
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## Documentation
|
|
23
16
|
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [API References](https://modernjs.dev/docs/apis)
|
|
17
|
+
- [English Documentation](https://modernjs.dev/en/)
|
|
18
|
+
- [中文文档](https://modernjs.dev)
|
|
27
19
|
|
|
28
20
|
## Contributing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
package/dist/js/modern/index.js
CHANGED
|
@@ -18,16 +18,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { fs } from "@modern-js/utils";
|
|
21
|
+
import { fs, deleteRequireCache } from "@modern-js/utils";
|
|
22
22
|
import { bundle, defaultGetOutputFile } from "./bundle";
|
|
23
|
-
function deleteRequireCache(path) {
|
|
24
|
-
if (require.cache[path]) {
|
|
25
|
-
delete require.cache[path];
|
|
26
|
-
}
|
|
27
|
-
if (module.children) {
|
|
28
|
-
module.children = module.children.filter((item) => item.filename !== path);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
23
|
function bundleRequire(filepath, options) {
|
|
32
24
|
return __async(this, null, function* () {
|
|
33
25
|
const configFile = yield bundle(filepath, options);
|
package/dist/js/node/index.js
CHANGED
|
@@ -44,14 +44,6 @@ __export(src_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(src_exports);
|
|
45
45
|
var import_utils = require("@modern-js/utils");
|
|
46
46
|
var import_bundle = require("./bundle");
|
|
47
|
-
function deleteRequireCache(path) {
|
|
48
|
-
if (require.cache[path]) {
|
|
49
|
-
delete require.cache[path];
|
|
50
|
-
}
|
|
51
|
-
if (module.children) {
|
|
52
|
-
module.children = module.children.filter((item) => item.filename !== path);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
47
|
function bundleRequire(filepath, options) {
|
|
56
48
|
return __async(this, null, function* () {
|
|
57
49
|
const configFile = yield (0, import_bundle.bundle)(filepath, options);
|
|
@@ -59,7 +51,7 @@ function bundleRequire(filepath, options) {
|
|
|
59
51
|
const req = (options == null ? void 0 : options.require) || require;
|
|
60
52
|
try {
|
|
61
53
|
mod = yield req(configFile);
|
|
62
|
-
deleteRequireCache(configFile);
|
|
54
|
+
(0, import_utils.deleteRequireCache)(configFile);
|
|
63
55
|
} finally {
|
|
64
56
|
if ((options == null ? void 0 : options.autoClear) === void 0 || options.autoClear) {
|
|
65
57
|
import_utils.fs.unlinkSync(configFile);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/node-bundle-require",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "A Progressive React Framework for modern web development.",
|
|
5
5
|
"homepage": "https://modernjs.dev",
|
|
6
6
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
7
7
|
"repository": "modern-js-dev/modern.js",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.18.0",
|
|
42
42
|
"esbuild": "0.15.7",
|
|
43
|
-
"@modern-js/utils": "2.
|
|
43
|
+
"@modern-js/utils": "2.4.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/jest": "^27",
|
|
47
47
|
"@types/node": "^14",
|
|
48
48
|
"jest": "^27",
|
|
49
49
|
"typescript": "^4",
|
|
50
|
-
"@scripts/build": "2.
|
|
51
|
-
"@scripts/jest-config": "2.
|
|
50
|
+
"@scripts/build": "2.4.0",
|
|
51
|
+
"@scripts/jest-config": "2.4.0"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
54
|
"publishConfig": {
|
|
File without changes
|
|
File without changes
|