Skip to content

Commit e296cdc

Browse files
committed
cs
1 parent a8432f9 commit e296cdc

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

lib/loaders/vue-unactivated-loader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ const loaderUtils = require('loader-utils');
2525
* register this as a loader for scss (for example), then the
2626
* user *would* still be able to use lang="scss"... but it would
2727
* not use our custom sass-loader configuration.
28+
*
29+
* @return {function}
2830
*/
2931
module.exports = function() {
30-
const options = loaderUtils.getOptions(this) || {}
32+
const options = loaderUtils.getOptions(this) || {};
3133

3234
// the vue-unactivated-loader-error transformer expects some of this language
3335
throw new Error(`Cannot process lang="${options.lang}" inside ${this.resourcePath}: the ${options.loaderName} is not activated. Call ${options.featureCommand} in webpack.config.js to enable it.`);

lib/loaders/vue.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ module.exports = {
9696
loaderName: 'sass-loader',
9797
featureCommand: loaderFeatures.getLoaderFeatureMethod('sass')
9898
}
99-
}
99+
};
100100
}
101101

102102
if (webpackConfig.useLessLoader) {
103103
loaders.less = extractText.extract(
104104
webpackConfig,
105105
lessLoaderUtil.getLoaders(webpackConfig, true),
106106
true
107-
)
107+
);
108108
} else {
109109
loaders.scss = {
110110
loader: require.resolve('./vue-unactivated-loader'),
@@ -113,7 +113,7 @@ module.exports = {
113113
loaderName: 'less-loader',
114114
featureCommand: loaderFeatures.getLoaderFeatureMethod('less')
115115
}
116-
}
116+
};
117117
}
118118

119119
return [

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"file-loader": "^0.10.1",
3737
"friendly-errors-webpack-plugin": "^1.6.1",
3838
"fs-extra": "^2.0.0",
39+
"loader-utils": "^1.1.0",
3940
"lodash": ">=3.5 <5",
4041
"pkg-up": "^1.0.0",
4142
"pretty-error": "^2.1.0",

0 commit comments

Comments
 (0)