You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- export default function (babel) {
- const { types: t } = babel;
- return {
- visitor: {
- ImportDeclaration(path) {
- const source = path.node.source.value;
- if (source.endsWith('.less')) {
- if (path.node.specifiers.length > 0) {
- path.node.source.value += '?modules';
- }
- }
- },
- },
- };
- }
|