Skip to content
Snippets Groups Projects
Upgrade.md 825 B
Newer Older
# 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/"
		]
	}
}
```