我有一个现有的 CSS 文件,我想将其包含在我的 ExtJS 生产版本中。
我正在使用自定义主题。我知道我可以转到 MyApp/packages/myCustomTheme/sass/etc/ 并使用@import
在 all.scss 文件中。但这使用了@import
在生产文件中。
我希望有一种方法可以将现有的 CSS 文件与应用程序的其余 CSS 一起压缩。
要将自定义 css 文件包含在生产版本中,您可以将样式表包含在<!-- <x-compile> -->
评论在你的index.html
。所以你的index.html
应该看起来像这样:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>YourAppName</title>
<link rel="stylesheet" href="link-to-custom.css">
<link rel="stylesheet" href="link-to-another-custom.css">
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<link rel="stylesheet" href="bootstrap.css">
<script src="ext/ext-dev.js"></script>
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="app/app.js"></script>
<!-- </x-compile> -->
</head>
<body></body>
我不知道是否有更好的方法来做到这一点。到目前为止,这对我有用。希望这可以帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)