From b8d4e93166df54d32f65dd0b3a73f9a9df0439bd Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 13 Jan 2014 10:46:36 -0800 Subject: [PATCH] Spit out a warning if @charset rule found Since Meteor will just ignore those. --- tools/bundler.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/bundler.js b/tools/bundler.js index 022fd7b904..ca0490f528 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -789,6 +789,12 @@ _.extend(ClientTarget.prototype, { // Pick only the imports from the beginning of file ignoring @charset // rules as Meteor assumes every file is in utf-8. + if (_.any(ast.stylesheet.rules, rulePredicate("charset"))) { + var fileName = file.url.replace(/^\//, ''); + // XXX make this a buildmessage.warning call rather than a random log + console.log("%s: warn: @charset rules in this file will be ignored as Meteor supports only utf-8 at the moment.", fileName); + } + ast.stylesheet.rules = _.reject(ast.stylesheet.rules, rulePredicate("charset")); var importCount = 0;