From 962427e23398e51ad727922ac52aa29aa71c487f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Mon, 2 Dec 2019 09:21:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 85a7b9b..72a41b8 100644 --- a/index.js +++ b/index.js @@ -129,8 +129,7 @@ const Compiler = { // 过滤不编译的文件 if (options.exclude) { - let exp = new RegExp(options.exclude, 'i') - if (exp.test(origin)) { + if (options.exclude.test(origin)) { return } } @@ -178,6 +177,10 @@ function __init__() { } } + if (options.exclude) { + options.exclude = new RegExp(options.exclude, 'i') + } + prefixer = postcss().use( autoprefixer({ browsers: options.browsers diff --git a/package.json b/package.json index 85f3aa0..4f4ce6a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "scss-to-css", "displayName": "scss-to-css", "description": "🔥 The easiest way to compile scss file to css. And autoprefixer at the same time.", - "version": "3.0.0", + "version": "3.0.1", "publisher": "yutent", "author": "Yutent [@yutent]", "icon": "logo.png",