This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Description
I get this error when compile mapbox-gl-style-spec in node_modules:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/jingsam/projects/underreact-test/node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js: Unexpected token (10:12)
8 | import { hcl, lab } from '../../util/color_spaces';
9 |
> 10 | import type { Stops } from '../stops';
| ^
11 | import type { Expression } from '../expression';
12 | import type ParsingContext from '../parsing_context';
13 | import type EvaluationContext from '../evaluation_context';
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
here is my babel.config.js:
module.exports = {
presets: ['@mapbox/babel-preset-mapbox', '@babel/preset-flow']
}