We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f26da45 commit 29c4ea7Copy full SHA for 29c4ea7
2 files changed
nativescript.vite.mjs
@@ -0,0 +1,22 @@
1
+import { createRequire } from "module";
2
+const require = createRequire(import.meta.url);
3
+
4
+let postcssConfig = "./postcss.config.js";
5
6
+try {
7
+ const twV4 = require("@tailwindcss/postcss");
8
+ const nsTailwind = require("@nativescript/tailwind");
9
+ postcssConfig = { plugins: [twV4, nsTailwind] };
10
+} catch (e2) {
11
+ console.warn(
12
+ "Inline PostCSS unavailable, falling back to ./postcss.config.js"
13
+ );
14
+}
15
16
+export default () => {
17
+ return {
18
+ css: {
19
+ postcss: postcssConfig,
20
+ },
21
+ };
22
+};
package.json
@@ -5,6 +5,7 @@
"main": "src/index.js",
"files": [
"src",
+ "nativescript.vite.mjs",
"nativescript.webpack.js"
],
"repository": "https://github.com/NativeScript/tailwind",
0 commit comments