From db1e2089ee1461a614791e07a8d654401dd49c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvin=20Ye=20=E5=8F=B6=E5=86=AC=E5=BC=80?= Date: Mon, 19 Jan 2015 22:51:01 +0800 Subject: [PATCH] fix require("css") 404 bug --- src/seajs-wrap.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/seajs-wrap.js b/src/seajs-wrap.js index 16b8fae..621844a 100644 --- a/src/seajs-wrap.js +++ b/src/seajs-wrap.js @@ -9,6 +9,10 @@ seajs.on("resolve", function(data) { var id = data.id if (!id) return "" + if(/\.css$/.test(data.id) && /\.css\.js$/.test(data.uri)) { + data.uri = data.uri.replace(/.js$/, "") + } + // avoid seajs-css plugin conflict if (/\.css\.js$/.test(id)) { return;