-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loader when compiling Spell #200
Comments
Could you specify the exact project you're trying? |
Yes. sure. i tried to realize this one: but my compiler seems to need another loader for compile that row of code. It seems that i must to configure Babel aproppriately. It's correct? There is another solution more simple? |
Indeed. The project uses JSX and you need to add the babel-loader to transpile it to plain javascript: https://medium.com/@sivaraj-v/basic-webpack-4-and-es5-to-es6-transpiler-using-babel-dc66e72c86c6. |
But in my project i don't have webpack.config.js, in order to add directive about babel. I only have tsconfig.json |
You do, as the error message indicates. At least it seems to be used under the hood. What you need to enable is transpilation of JSX (inside an Angular project). Not sure how that works. Alternatively you'd need to split-up the extension (to be transpiled individually) and the integration into your Angular app. |
"Alternatively you'd need to split-up the extension (to be transpiled individually) and the integration into your Angular app. ..." |
1️⃣ You create your customizations in a fork of https://github.com/bpmn-io/bpmn-js-examples/tree/master/properties-panel-extension. That project compiles JSX -> JS. 2️⃣ Consume the transpiled JS resources produced in 1️⃣ in your Angular app. To get additional feedback on this case I'd ask you to create a topic in our forum and cross-reference this thread. Maybe users already solved this issue in a simpler manner. |
OK ... i found a complete solution to convert SpellProps.js(x) in SpellProps.js, in pure mode. Object.defineProperty(exports, "__esModule", { exports["default"] = _default; var _propertiesPanel = require("@bpmn-io/properties-panel"); function _default(element) { function Spell(props) { var getValue = function getValue() { var setValue = function setValue(value) { return _react.createElement(_propertiesPanel.TextFieldEntry, { and this is the output... Now in browser, on the console, i find this error : " Uncaught (in promise): TypeError: Cannot add property __, object is not extensible" ... It's a bug?! or ... what? |
@burn83 This looks like another Angular <-> bpmn.io tooling incompatibility issue. Please share a codesandbox that allows us to reproduce this behavior. We aim for compatibility with existing UI frameworks. Experience has shown that some (Angular, Vue) do interesting magic though that you may need to disable for bpmn-js to work reliably. |
We plan to simplify our examples to not use JSX/transpilation anymore (#206). That should workaround most of the complications you mentioned in this issue. |
When I try to compile code like as example i receive an error that suggest me to add another loader to read correctly a row of the Spellprops.js in which we can retrieve "return <"
Instruction. Can, anyone helps me?
The text was updated successfully, but these errors were encountered: