0

In my Extjs app I have kept custom.css file in the resources folder of the root for testing and in the build- resources folder. And add the css path to two both index.html files(test and build). But whenever I make it to convert to build production, index.html file overwrites and custom.css file finds missing. Somewhat problematic it is. I know that this is because I add this file externally. But Is there any permanent solutions to fix this, without violating the Extjs app structure ??

3
  • i don't think this is an extjs problem. It is just the way you have set up your project... i think Commented Aug 6, 2014 at 20:22
  • hi oliver. thanks for the reply.but the question is, where to keep the custom css file in the app? Is there any convention in Extjs to use custom css file? Commented Aug 7, 2014 at 7:34
  • if you chose the way that u only include a css file - then u can store it in the resource folder. Commented Aug 7, 2014 at 10:11

1 Answer 1

1

You can add your custom styles via scss. There are several articles around the web about styling your ExtJS app.

http://docs.sencha.com/extjs/5.0.0/core_concepts/theming.html

http://www.rallydev.com/community/engineering/guide-custom-themes-extjs-4 [dead link]

If you only want to add your single custom css file - which i do not recommend - you can do things like that:

Include an existing CSS file in custom extjs theme

http://www.sencha.com/forum/showthread.php?270694-How-to-include-custom-components-CSS-in-build-CSS

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

2 Comments

thanks everyone for the reply. ultimately solved the problem with custon css file.but new problem occurs with the custom/external js file. I have kept this file in the resource folder and added it to app.json file. but when i am going to build it to production build fails... I don't know why??
what fails exactly? try to include the custom JS file outside of the <!-- <x-compile> --> ... <!-- </x-compile> --> marks in your index.html file. ( similar to the third link approach with the css ) i would not recommend using the app.json file for this.

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.