This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Flow error in node_modules #89
Comments
Seems that we set
|
@jingsam it is intentional not to compile non-standard Javascript (flow) in the node_modules. To get around this problem, you will have to manually compile // underreact.config.js
module.exports = {
webpackConfigTransform: config => {
injectGlStyleSpecLoader(config);
return config;
}
};
function injectGlStyleSpecLoader(webpackConfig) {
const rulesOneOf = webpackConfig.module.rules.find(obj => obj.oneOf).oneOf;
// The first loader is the regular javascript loader
const myLoader = Object.assign({}, rulesOneOf[0], {
exclude: undefined,
include: new RegExp(
'^' +
path.resolve(
__dirname,
'node_modules/@mapbox/mapbox-gl-style-spec/(?!dist)'
)
)
});
rulesOneOf.unshift(myLoader);
} |
@kepta Do you mean standard Javascript is the code that conform I think when users specify |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I get this error when compile mapbox-gl-style-spec in node_modules:
here is my babel.config.js:
The text was updated successfully, but these errors were encountered: