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 55 "main" : " src/index.js" ,
66 "files" : [
77 " src" ,
8+ " nativescript.vite.mjs" ,
89 " nativescript.webpack.js"
910 ],
1011 "repository" : " https://github.com/NativeScript/tailwind" ,
You can’t perform that action at this time.
0 commit comments