From 63a3eedc616f9a3e8cefbc455671ee54c3ecd5dd Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 27 Aug 2021 18:44:43 +0800 Subject: [PATCH] fix(nvue): preprocess --- packages/uni-cli-nvue/src/webpack/loader/preprocess.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uni-cli-nvue/src/webpack/loader/preprocess.ts b/packages/uni-cli-nvue/src/webpack/loader/preprocess.ts index b9079dba1..630d74e32 100644 --- a/packages/uni-cli-nvue/src/webpack/loader/preprocess.ts +++ b/packages/uni-cli-nvue/src/webpack/loader/preprocess.ts @@ -8,7 +8,7 @@ import { import { normalizePreprocessErrMsg } from '../../utils/preprocess' const utils = require('loader-utils') function preprocessLoader(this: LoaderContext<{}>, content: string, map: any) { - if (content.indexOf('#ifdef') === -1) { + if (!content.includes('#endif')) { return this.callback(null, content, map) } const types: ('js' | 'html' | 'css' | 'json')[] = utils.getOptions(this) -- GitLab