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
require("css文件")外部样式打包后不显示 #993
Comments
是不是没有引入 style 插件?控制台上是否有 seajs.importStyle 不存在的报错? |
感谢回答! style 插件引入了,打包构建后的 require("otherlibUrl/1.css"); //外部样式 就是想问下 define("apps/test/css", ["./1.css"], function(e) { 两个代码为什么一个可以一个不可以 |
可能是grunt-contrib-concat的问题,对找不到的文件会删除掉而不是忽略 |
嗯,是 @Aturan 说的问题。构建这一块,我们会再好好考虑下怎么简化,目前还是有点小复杂。 |
thanks |
define(function(require,exports,module){
require("./1.css"); //自定义样式
require("otherlibUrl/1.css"); //外部样式
})
上面两个 在src 调用时 两个文件都能加载
但是使用SPM打包后 只能显示 打包后的结果文件
define("apps/test/css", ["./1.css"], function(e) {
e("./1.css"), e("otherlibUrl/1.css")
}), define("apps/test/1.css", [], function() {
seajs.importStyle("body{background-color:#abc123}")
});
请教两个问题
1.seajs 引入css文件是否只能使用 style插件?
2.为什么使用源文件可以自动加载css文件而打包后文件却不能加载?
The text was updated successfully, but these errors were encountered: