-
-
Notifications
You must be signed in to change notification settings - Fork 197
Global CSS is NOT applied when "useLegacyWorkflow": false #4624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @YaakovDavid , I've tried to reproduce the issue, but with no luck. Can you please share more details about your application - are you using |
I updated I am using CSS I just reproduced this issue with a completly new app
Than in app.ts I added
I created a folder called css and a file in it called style.css than I made a simple change
and the actionBar stayed blue, then I when into the home-page.ts and
and it showed that it is using css/style.css than I went into
from false
to true and the actionBar turned red app info:
|
Hey @YaakovDavid ,
global.registerModule("./css/style.css", () => require("./css/style.css"));
application.setCssFileName("./css/style.css"); Can you give it a try and see if it works on your side? |
Adding
did work. Thank you so much for your quick responses and help! |
Update: If the global styles file is |
hey where i need to update this code? |
@vick16ach in app.ts |
I've just updated the CLI and started using the new workflow to build the app. The app builds fine and typescript changes are picked up properly and compiled to JS and kicks off a build Changes done to |
Hi @Manbearpixel, We don't have any known issues with changes in
Could you provide us with a sample application demonstrating your issue? |
@DimitarTachev I'll try dummying down an application for my project. Unfortunately most of the source has not been opened up yet, so i'll limit it to a few simpler views. I appreciate you replying back! It might be some sort of I had to change this file:
To specifically use |
@DimitarTachev Alright! I've minified the codebase and left one primary example. Here is the repo: So I ran Now to recreate the issue I am having... Look at the first view which is located in After I save this file, nothing kicks off in the console and the app does not rebuild. I'd have to actually open up the should-be-generated As I stated, this may be a webpack config issue, and if so I'd greatly appreciate help looking at it to see what I might be doing wrong! Otherwise this new build process for me when just running it to develop rather than do release builds will not work properly :( |
Hi @Manbearpixel, Thanks for sharing a sample application! I moved this into a new issue as it's not related to the global css. |
I'm closing this issue as starting from this PR and NativeScript 6.0, we are automatically including all app files instead of requiring the old You could also take a look at this issue comment for a way of excluding files from the Webpack compilation. Bear in mind that the |
Global CSS is NOT applied when
"useLegacyWorkflow": false
but when tuned to true"useLegacyWorkflow": true
it works perfectly(AND THAT IS THE ONLY CHANGE)
I ran
application.getCssFileName()
and it returns the correct file (it just doesn't work)My app is running Nativescript Core with Typescript
App info:
The text was updated successfully, but these errors were encountered: