glslify / glslify/babel-plugin-glslify
Incompatibility with babel 7
- Dominant language
- JavaScript
- Stars
- 49
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
In babel 7 the property `state.file.log` is undefined and raises the following error
```textplain
{ TypeError: .../src/WidgetWorkspace3DViewer.js: Cannot read property 'filename' of undefined
at PluginPass.CallExpression (.../node_modules/babel-plugin-glslify/glslify-babel.js:183:39)
at newFn (.../node_modules/@babel/traverse/lib/visitors.js:175:21)
at NodePath._call (.../node_modules/@babel/traverse/lib/path/context.js:55:20)
at NodePath.call (.../node_modules/@babel/traverse/lib/path/context.js:42:17)
at NodePath.visit (.../node_modules/@babel/traverse/lib/path/context.js:92:31)
at TraversalContext.visitQueue (.../node_modules/@babel/traverse/lib/context.js:116:16)
at TraversalContext.visitMultiple (.../node_modules/@babel/traverse/lib/context.js:83:17)
at TraversalContext.visit (.../node_modules/@babel/traverse/lib/context.js:142:19)
at Function.traverse.node (.../node_modules/@babel/traverse/lib/index.js:82:17)
at NodePath.visit (.../node_modules/@babel/traverse/lib/path/context.js:99:18) code: 'BABEL_TRANSFORM_ERROR' }
```
from this lines:
https://github.com/glslify/babel-plugin-glslify/blob/a9b799fab39007f5df5e7b7841118e70ddf46612/glslify-babel.js#L159
https://github.com/glslify/babel-plugin-glslify/blob/a9b799fab39007f5df5e7b7841118e70ddf46612/glslify-babel.js#L183
some references:
https://github.com/babel/babel/issues/7715
https://stackoverflow.com/questions/35857271/get-current-filename-in-babel-plugin
I will post a PR to fixed
Kind regards
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.