在我探索plop微型发电机时,我遇到了上述错误, 代码如下:
import {trimRight, isEmpty} from 'lodash'
const ensurePlural = ( text ) => trimRight( text, "s" ) + "s";
const isNotEmptyFor = ( name ) => {
return ( value ) => {
if ( isEmpty( value ) ) return name + " is required";
return true;
}
}
..... ... 当我运行npm run plop时,我得到以下内容
(function (exports, require, module, __filename, __dirname) { import {trimRight, isEmpty} from 'lodash'
^^^^^^
SyntaxError: Unexpected token import