mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Update UPGRADE-1.12.md
This commit is contained in:
parent
8800736786
commit
5bfc11a541
1 changed files with 36 additions and 14 deletions
|
|
@ -74,24 +74,20 @@ with test or remove these services with complier pass.
|
|||
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
|
||||
```
|
||||
|
||||
### Asset management changes
|
||||
### Frontend toolset changes
|
||||
|
||||
#### Dependencies update
|
||||
|
||||
In `1.12` we have updated our frontend dependencies to the latest versions. This means that you might need to update your dependencies as well.
|
||||
The full list of all dependencies can be found in the [package.json](./package.json) file.
|
||||
|
||||
Due to a fact every project is different, we cannot provide a list of all changes that might be needed. However, we have prepared a list of the most common changes that might be needed.
|
||||
|
||||
We updated gulp-sass plugin as well as the sass implementation we use to be compatible with most installation
|
||||
([node-sass](https://sass-lang.com/blog/libsass-is-deprecated) is deprecated and incompatible with many systems).
|
||||
Therefore you need to update your code to follow this change.
|
||||
|
||||
1. Change the gulp-sass version you are using to `^5.1.0` (package.json file)
|
||||
```diff
|
||||
- "gulp-sass": "^4.0.1",
|
||||
+ "gulp-sass": "^5.1.0",
|
||||
```
|
||||
|
||||
2. Add sass to your package.json:
|
||||
```diff
|
||||
+ "sass": "^1.48.0",
|
||||
```
|
||||
|
||||
3. Follow [this guide](https://github.com/dlmanning/gulp-sass/tree/master#migrating-to-version-5) to upgrade your
|
||||
1. Follow [this guide](https://github.com/dlmanning/gulp-sass/tree/master#migrating-to-version-5) to upgrade your
|
||||
code when using gulp-sass this is an example:
|
||||
```diff
|
||||
- import sass from 'gulp-sass';
|
||||
|
|
@ -100,7 +96,7 @@ Therefore you need to update your code to follow this change.
|
|||
+ const sass = gulpSass(realSass);
|
||||
```
|
||||
|
||||
4. Library chart.js lib has been upgraded from 2.9.3 to 3.7.1. Adjust your package.json as follows:
|
||||
2. Library chart.js lib has been upgraded from 2.9.3 to 3.7.1. Adjust your package.json as follows:
|
||||
|
||||
```diff
|
||||
- "chart.js": "^2.9.3",
|
||||
|
|
@ -115,3 +111,29 @@ Therefore you need to update your code to follow this change.
|
|||
+ "rollup-plugin-uglify": "^6.0.2",
|
||||
```
|
||||
Please visit [3.x Migration Guide](https://www.chartjs.org/docs/latest/getting-started/v3-migration.html) for more information.
|
||||
|
||||
Example changes we made in our codebase to adjust it to the new version of dependencies might be found [here](https://github.com/Sylius/Sylius/pull/14319/files).
|
||||
Remember, when you face any issues while updating your dependencies you might ask for help in our [Slack](https://sylius-devs.slack.com/) channel.
|
||||
|
||||
#### Webpack becomes our default build tool 🎉
|
||||
|
||||
`1.12` comes with a long-awaited change - Webpack becomes our default build tool.
|
||||
|
||||
If you want to stay with Gulp, you can do it by following the steps below:
|
||||
1. Go to `config/packages/_sylius.yaml` file and add the following line:
|
||||
```yaml
|
||||
parameters:
|
||||
#...
|
||||
sylius_ui.use_webpack: false
|
||||
```
|
||||
|
||||
If you decide to use Webpack, you need to follow the steps below:
|
||||
|
||||
1. Make sure you have latest js dependencies installed (you can compare your `package.json` file with the one from `1.12`).
|
||||
2. Make sure you have `webpack.config.js` file, if not, you can copy it from [Sylius/Sylius-Standard](https://github.com/Sylius/Sylius-Standard) repository.
|
||||
3. Run the following command
|
||||
```bash
|
||||
yarn encore dev
|
||||
```
|
||||
|
||||
**Remember!** Every project is different, so you might need to adjust your code to work with Webpack.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue