Skip to content

jsyczhanghao/feather2-hook-anysuffix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

feather2-hook-anysuffix

解决feather2不支持对非components目录中的js和css文件require或import时必须写后缀的问题

使用

npm install feather2-hook-anysuffix --save-dev
//conf.js
//新增一个查找任意后缀的hook
feather.config.set('modules.hook', 'anysuffix');
//支持查找es6,vue
feather.config.set('project.fileType.js', ['es6', 'vue']);
//static/xxx.js

import A from './a'; //先查找./a.es6, 在查找./a.vue

//查找当前文件下的./index文件

require.async('./', () => {
	//do anything
})
feather2 release

注意: 目前插件不支持lothar,需知,慎用

About

非components目录,支持js和css文件查找

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors