提交 1aac5617 编写于 作者: fxy060608's avatar fxy060608 提交者: qiang

fix(nvue): preprocess css

# Conflicts:
#	packages/vue-cli-plugin-uni/packages/sass-loader/dist/index.js
上级 4e83fc2c
......@@ -33,6 +33,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
*/
function loader(content) {
const options = (0, _loaderUtils.getOptions)(this) || {};
// fixed by xxxxxx
const isNVue = !!options.nvue;
delete options.nvue;
(0, _schemaUtils.default)(_options.default, options, {
name: 'Sass Loader',
baseDataPath: 'options'
......@@ -54,7 +57,7 @@ function loader(content) {
mainFiles: ['_index', 'index', '...'],
extensions: ['.scss', '.sass', '.css', '...']
});
sassOptions.importer.push((0, _webpackImporter.default)(this.resourcePath, resolve, addNormalizedDependency));
sassOptions.importer.push((0, _webpackImporter.default)(this.resourcePath, resolve, addNormalizedDependency, isNVue));
} // Skip empty files, otherwise it will stop webpack, see issue #21
......@@ -111,4 +114,4 @@ function loader(content) {
}
var _default = loader;
exports.default = _default;
\ No newline at end of file
exports.default = _default;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册