Skip to content
Snippets Groups Projects
Commit e10dad85 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] add upgrade info

parent 82e9150d
No related branches found
No related tags found
1 merge request!18[FEATURE] remove static JS includes and rewrite all JS to ES6 modules
# Upgrade from ```6.x.x``` to ```7.x.x```
In Version 7, we rewrote all included JavaScript to ES6 modules. This means that they won't be included in your site automatically when you install the extension.
## Importing the sgnews bundle in your main project
sg_news offers a front-package that imports all sub modules and initilaizes them correctly. You can import this in your bundle like that:
```js
import SgNews from 'sgnews';
new SgNews();
```
### Mapping ```sgnews``` to the extension JavaScript
In order for your module bundler to find the ```sgnews``` package, you need to add the path to your configuration. If you are using the SGC, you can add the following to your ```.sgc-config.json```
```js
{
"js": {
"libraryPaths": [
...
"./web/typo3conf/ext/sg_news/Resources/Public/JavaScript/"
]
}
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment