问题描述
我有一个现有的 CSS 文件,我想将它包含在我的 ExtJS 生产版本中.
I have an existing CSS file that I would like to include in my ExtJS production build.
我正在使用自定义主题.我知道我可以转到 MyApp/packages/myCustomTheme/sass/etc/并在 all.scss 文件中使用 @import
.但这在生产文件中使用了 @import
.
I am using a custom theme. I know I can go to MyApp/packages/myCustomTheme/sass/etc/ and use an @import
in the all.scss file. But that uses the @import
in the production file.
我希望有一种方法可以让我现有的 CSS 文件与我应用的其余 CSS 文件一起压缩.
I'm hoping there is a way that I can get my existing CSS file compressed with the rest of my app's CSS.
推荐答案
根据指南,我们应该在 etc/all.scss 中放置 @import
语句.
According to the guide, we should be placing @import
statements in etc/all.scss.
我发现这样做时,任何导入的文件实际上都编译在我们主题的 css 文件中.生产版本中未使用导入.
I found that in doing this, any imported files were in fact compiled in our theme's css file. Imports were not used in the production build.
http://docs.sencha.com/extjs/4.2.1/#!/guide/theming - 请参阅添加自定义实用程序 SASS"部分
http://docs.sencha.com/extjs/4.2.1/#!/guide/theming - see the section on "Adding Custom Utility SASS"
这篇关于在自定义 extjs 主题中包含现有的 CSS 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!