@nitronjs/framework 0.3.4 → 0.3.5
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/Build/CssBuilder.js +6 -1
- package/package.json +1 -1
package/lib/Build/CssBuilder.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import crypto from "crypto";
|
|
4
|
+
import { createRequire } from "module";
|
|
4
5
|
|
|
5
6
|
class CssBuilder {
|
|
6
7
|
#cache;
|
|
@@ -91,7 +92,11 @@ class CssBuilder {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
if (!this.#scanner) {
|
|
94
|
-
const
|
|
95
|
+
const twNodePath = import.meta.resolve("@tailwindcss/node");
|
|
96
|
+
const req = createRequire(twNodePath);
|
|
97
|
+
const oxidePath = req.resolve("@tailwindcss/oxide");
|
|
98
|
+
const oxideUrl = "file:///" + oxidePath.replace(/\\/g, "/");
|
|
99
|
+
const { Scanner } = await import(oxideUrl);
|
|
95
100
|
|
|
96
101
|
this.#scanner = new Scanner({
|
|
97
102
|
sources: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitronjs/framework",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "NitronJS is a modern and extensible Node.js MVC framework built on Fastify. It focuses on clean architecture, modular structure, and developer productivity, offering built-in routing, middleware, configuration management, CLI tooling, and native React integration for scalable full-stack applications.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"njs": "./cli/njs.js"
|