giuseppeg / giuseppeg/styled-jsx-postcss

Catch actual errors in case of syntax issues.

Open
#5 3 comments 2 reactions 1 assignee Claimed by @aga5tya View on GitHub
Dominant language
JavaScript
Stars
64
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Everytime there is an compilation error, lets say we miss out semicolons, the build fails with a generic error as below always.

Would be good if it gives the actual error provided by postcss plugins. I have tried with the example provided at next.js repo, same issue.

```
Module build failed: TypeError: /Users/prithviraju/Code/sample/with-styled-jsx-postcss/pages/index.js?entry: css.map is not a function
at PluginPass.enter (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/styled-jsx-postcss/dist/babel.js:110:15)
at newFn (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/index.js:114:17)
at NodePath.visit (/Users/prithviraju/Code/sample/with-styled-jsx-postcss/node_modules/babel-traverse/lib/path/context.js:115:19)
@ multi ./~/next/dist/client/webpack-hot-middleware-client ./pages?entry
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.