File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change 5
5
"main" : " src/index.js" ,
6
6
"files" : [
7
7
" src" ,
8
+ " nativescript.vite.mjs" ,
8
9
" nativescript.webpack.js"
9
10
],
10
11
"repository" : " https://github.com/NativeScript/tailwind" ,
You can’t perform that action at this time.
0 commit comments