https://github.com/imweb/fis3-hook-fix
fix something of fis3 build
https://github.com/imweb/fis3-hook-fix
Last synced: about 1 year ago
JSON representation
fix something of fis3 build
- Host: GitHub
- URL: https://github.com/imweb/fis3-hook-fix
- Owner: imweb
- Created: 2017-05-12T09:01:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-06T09:40:46.000Z (almost 9 years ago)
- Last Synced: 2025-03-01T00:13:54.343Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 29
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fis3-hook-fix
fix something of fis3 build
## fix addSameNameRequire
fis 没有提供接口设置文件的后缀名,默认把 `xxx.yy` 的 `.yy` 作为文件后缀名
这也没什么错误,但是 fis 有一个逻辑是 `addSameNameRequire`(通过设置 `useSameNameRequire`)
它会把同名的关联文件添加依赖,比如依赖 `index.js` 模块,也会同时依赖 `index.css`(如果存在的话)
这个方式在实现的时候,会把文件名去掉后缀名,然后在添加需要同名依赖的类型,然后去找文件
因为后缀名的关系,如果希望 `index.es6.js` 同名依赖 `index.css` 的话,就有问题了
因此通过此插件 fix 这个问题,例子如下:
```
fis.hook('commonjs', {
fixAddSameNameRequire: ['.es6.js']
});
```