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
docs additions for external add-ons usage #4233
Conversation
✅ Deploy Preview for volto ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
Minor syntax fixes, and a question about the lexer.
docs/source/addons/index.md
Outdated
@@ -455,6 +455,74 @@ volto-slate can declare in its `package.json`: | |||
And of course, the dependency add-on can depend, on its turn, on other add-ons | |||
which will be loaded as well. Circular dependencies should be avoided. | |||
|
|||
## problems with untranspiled add-on dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## problems with untranspiled add-on dependencies | |
## Problems with untranspiled add-on dependencies |
docs/source/addons/index.md
Outdated
that are not securely transpiled or haven't been transpiled at all. In that case | ||
you might see an error like the following: | ||
|
||
```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this js or console output? If the latter, then:
```js | |
```console |
docs/source/addons/index.md
Outdated
|
||
Babel automatically transpiles the code in your add-on, but `node_modules` are | ||
excluded from this process, so we need to include the add-on path in the list of | ||
modules to be transpiled. This can be accomplished by customizing the Webpack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They actually lowercase their own name.
modules to be transpiled. This can be accomplished by customizing the Webpack | |
modules to be transpiled. This can be accomplished by customizing the webpack |
docs/source/addons/index.md
Outdated
module.exports = { modifyWebpackConfig: customModifyWebpackConfig, plugins }; | ||
``` | ||
|
||
First we need some setup to get the webpack config from Volto's configuration. Once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First we need some setup to get the webpack config from Volto's configuration. Once | |
First we need some setup to get the webpack configuration from Volto's configuration. Once |
docs/source/addons/index.md
Outdated
``` | ||
|
||
First we need some setup to get the webpack config from Volto's configuration. Once | ||
we have that, we just need to resolve the path to the desired add-ons and push it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have that, we just need to resolve the path to the desired add-ons and push it | |
we have that, we need to resolve the path to the desired add-ons, and push it |
@stevepiercy Thanks a lot. Made suggested changes. |
This information was very helpful to me when dealing with some add-ons (thanks Tiberiu Ichim for the blog post about untranspiled dependencies). I believe it would be good to have this in the docs.