Flow “Required module not found” when importing a CSS file

前端 未结 3 1270
一生所求
一生所求 2021-01-31 17:14

When I try to import CSS via webpack(import (./index.css)) I\'m getting this error:

3: import \'./index.css\';
          ^^^^^^^^^^^^^ ./index.css. Required modu         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 17:41

    Thanks @MoOx, this is great!! Any suggestions on a stub for webpack bundle loader?

    I was thinking something like this...

    module.name_mapper='^bundle?[a-zA-Z0-9$_]+$' -> '/flow/stubs/bundle-loader.js.flow'
    
    require('bundle?lazy&name=bundleName!path/to/file')
    

提交回复
热议问题