import { jsRegex } from '../config/regex' ; import { RuleSetRule } from '@balm-core/index' ; function jsLoader ( ) { const options = Object . assign ( { } , BalmJS . config . scripts . babelLoaderOptions ) ; return { test : jsRegex , include : [ BalmJS . file . absPaths ( BalmJS . config . src . js ) , ... BalmJS . config . scripts . includeJsResource ] , loader : require . resolve ( 'babel-loader' ) , options } ; } export default jsLoader ;