I use codemirror-graphql according to the method in Getting Started.
But there is two file cant parse by webpack 1.15.0.
there is warning:
WARNING in ./~/[email protected]@graphql-language-service-interface/dist/getOutline.js.flow
Module parse failed: /Users/ahkari/Documents/tb-project/new-steins/node_modules/[email protected]@graphql-language-service-interface/dist/getOutline.js.flow Unexpected token (11:12)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (11:12)
@Ahkari This is because webpack tried to bundleup .flow extension file, In order to exclude .flow extension files follow the below steps
First you need to install ignore-loader
npm install ignore-loader
In webpack.config.js file add the below module rule
module: {
rules : [{ test: /\.flow$/, loader: 'ignore-loader' }]
}
If you have more than one rule in module, you should place this rule in first order. This rule will exclude all .flow extension file from loader
It works, Thanks @KarthikNedunchezhiyan
Can this be closed?
this could also be achieved with the @babel/preset-flow
Most helpful comment
@Ahkari This is because webpack tried to bundleup .flow extension file, In order to exclude .flow extension files follow the below steps
First you need to install ignore-loader
npm install ignore-loaderIn webpack.config.js file add the below module rule
If you have more than one rule in module, you should place this rule in first order. This rule will exclude all .flow extension file from loader