1

In app.json, Ext JS 5 provide a way to include CSS file using object. Here my code in app.json

"css": [
        {
            "path": "bootstrap.css",
            "bootstrap": true
        },
        {
            "path": "app.css"
        }
    ],

It seems app.css does not include in HTML.

any idea?

2 Answers 2

4

You have to run

sencha app refresh

after adding new resources / changing app.json.

This will then enable the microloader to fetch the new resources.

Sign up to request clarification or add additional context in comments.

Comments

0

As far as I know, CSS files are never bundled in HTML boilerplate like JavaScript. CSS is always loaded separately.

Your configuration looks correct. Is app.css CSS being loaded at runtime?

4 Comments

app.css is not being loaded at runtime, but bootstrap.css loaded
Is app.css not being loaded in dev mode, or in testing/production build?
Ok I got a bit confused, thought you meant built mode. This explains why it worked after running sencha app refresh - this target will regenerate bootstrap.css that is used to load stylesheets.
running sencha app refresh will regenerate bootstrap.json ot bootstrap.css. app.css will be registered in bootstrap.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.