Skip to content

Instantly share code, notes, and snippets.

@cef62
Forked from MoOx/.flowconfig
Created April 27, 2017 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cef62/3257e5cf0d81e12659b7fda9124b4e15 to your computer and use it in GitHub Desktop.
Save cef62/3257e5cf0d81e12659b7fda9124b4e15 to your computer and use it in GitHub Desktop.
flow config webpack adjustements to avoid the "Required module not found" for png, css, svg etcc
# ...
[options]
# webpack loaders
module.name_mapper='.*\.css$' -> '<PROJECT_ROOT>/flow/stub/css-modules.js'
module.name_mapper='.*\.\(svg\|png\|jpg\|gif\)$' -> '<PROJECT_ROOT>/flow/stub/url-loader.js'
// @flow
type CSSModule = { [key: string]: string }
const emptyCSSModule: CSSModule = {}
export default emptyCSSModule
// @flow
const s: string = ""
export default s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment