Open BigAB opened 6 years ago
So, when using steal, the stage-2 ES feature Class Properties works with steal in the browser, but fails when building with steal-tools.
Here is a simple recreation gist: https://gist.github.com/anonymous/bd71f1e976b0cc568f1bdd36efea506b
Simply clone and run steal-tools (assuming you have steal-tools installed globally)
steal-tools
You will get an error like this:
OPENING: ~/steal-tools-and-class-properties/package.json!npm Transpiling... ERROR: Unable to transpile steal-tools-and-class-properties@0.0.1#index: unknown: Missing class properties transform. 1 | class Thing { > 2 | foo = () => {} | ^ 3 | } 4 | 5 | export default Thing ERROR: Build failed
Which is weird in it's own right, but to add to the crazyness, all you need to do is add some config to the steal field in the package.json
steal
{ "name": "steal-tools-and-class-properties", "version": "0.0.1", "main": "index.js", "dependencies": { "steal-tools": "^1.9.1" }, "steal": { "babelOptions": { "plugins": ["transform-class-properties"] } } }
...and that FIXES it!
Weird huh?
So, when using steal, the stage-2 ES feature Class Properties works with steal in the browser, but fails when building with steal-tools.
Here is a simple recreation gist: https://gist.github.com/anonymous/bd71f1e976b0cc568f1bdd36efea506b
Simply clone and run
steal-tools
(assuming you have steal-tools installed globally)You will get an error like this:
Which is weird in it's own right, but to add to the crazyness, all you need to do is add some config to the
steal
field in the package.json...and that FIXES it!
Weird huh?