Skip to content
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 x.css 会变成 x.css.js 算BUG吗? #10

Open
alvin2ye opened this issue Jan 16, 2015 · 6 comments
Open

require x.css 会变成 x.css.js 算BUG吗? #10

alvin2ye opened this issue Jan 16, 2015 · 6 comments

Comments

@alvin2ye
Copy link

require('./downloads/css/basic.css');

PS: build 后是正常的

@afc163
Copy link
Member

afc163 commented Jan 16, 2015

require css 文件需要用到 seajs-css 插件吧。这个和 wrap 应该无关。

@alvin2ye
Copy link
Author

@afc163 这个问题还是一直困扰着.

var $ = require('jquery');
require('./css/recordselect.css');

如果代码中有 require css
用spm build 后是正常的.
用 spm-server 或者 spm doc 是好的.
但是开发环境 + seajs-wrap 会抛 404, 要找的文件变成 "xx.css.js"

我是在 rails 下开发的. 不能一直开始 spm-server.

So, 不知道要怎么处理

@afc163
Copy link
Member

afc163 commented Jan 19, 2015

@alvin2ye
Copy link
Author

@afc163 之前就加了. 没有用.

var css = require('./downloads/css/basic.css.tpl');
require('import-style')(css);

最后我是先把别人的css 改名为 tpl
改加载 import-style , 再把别人的包加个2 (如dropzone2 ). 但是这样改很难受, 我本想直接改 seajs-wrap 又没找到地方.

@afc163
Copy link
Member

afc163 commented Jan 19, 2015

给个 demo 看一看。

@alvin2ye
Copy link
Author

@afc163 过几天整理一个给你, 主要是还要在非 spm-server的环境下, 你有Rails的环境吗?
我现在先加了一个 sea-wrap2 先用着

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants