symfony new . --version="6.3.*" --webapp
Install Node.js and Node package manager (npm or yarn) for your platform
Install Encore bundle
composer require symfony/webpack-encore-bundle
yarn install
Install sass/scss support:
- Uncomment
.enableSassLoader()inwebpack.config.js - Install node packages
yarn add sass-loader sass --dev
Install additional dependencies like autoprefixer PostCSS:
- Add
.enablePostCssLoader()towebpack.config.js - Install node packages, like
yarn add postcss postcss-loader autoprefixer --dev - Create
postcss.config.jsfile - Add browserslist section to
package.jsonfile - Do not forget to delete
node_modules/.cache/babel-loader/folder if you change browserslist
Install 3rd party libraries, like
yarn add bootstrap @popperjs/core font-awesome --dev
and import them in css file
@import '~bootstrap';
@import '~font-awesome';
Create working project endpoint and add js/css using Encore. Modify webpack.config.js if needed.
Install Stimulus Bundle
composer require symfony/stimulus-bundle
yarn install --force
Add example usage of Stimulus
Install UX Turbo package
composer require symfony/ux-turbo
yarn install --force
Create some pages and make example usage of UX Turbo
docker-compose -p sfes up -d
php bin/console doctrine:database:create --if-not-exists
php bin/console doctrine:migrations:migrate -n
php bin/console doctrine:fixtures:load
yarn install
docker-compose -p sfes up -d
symfony server:start
yarn watch