Sass 带包裹的条件导入:拒绝应用来自。。。因为它的MIME类型(';text/html';)

Sass 带包裹的条件导入:拒绝应用来自。。。因为它的MIME类型(';text/html';),sass,mime,es6-modules,parcel,parceljs,Sass,Mime,Es6 Modules,Parcel,Parceljs,我正在尝试有条件地导入SASS文件,如下所示: if (theme) { import("./overrides/theme.sass"); } 但它抛出了以下错误: Refused to apply style from '...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. 不过

我正在尝试有条件地导入SASS文件,如下所示:

if (theme) {
    import("./overrides/theme.sass");
}
但它抛出了以下错误:

Refused to apply style from '...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
不过,这是可行的:

import "./overrides/theme.sass";
我不知道这是否是文件路径或其他方面的问题,但我认为Parcel可能动态注入了错误的CSS文件。有什么解决办法吗?提前谢谢