Skip to content

An other pack to install on top of the default Symfony skeleton, similar to symfony/webpack-pack but with Webpack instead of AssetMapper and able to compile .vue files.

License

Notifications You must be signed in to change notification settings

fastfony/webapp-webpack-encore-vue-sfc-pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Webapp pack for Symfony with Webpack Encore for Vue (Single-file component)

Latest Stable Version Total Downloads License

An other pack to install on top of the default Symfony skeleton. Include webpack-encore-bundle and necessary things for Vue single-file component (i.e. .vue)

It's a similar pack to symfony/webapp-pack but for persons would like to continue to use webpack and .vue files (Single-file component), instead of AssetMapper.

Installation

After creating Symfony Applications, in your project directory:

composer remove symfony/asset-mapper symfony/stimulus-bundle symfony/ux-turbo
composer require fastfony/webapp-webpack-encore-vue-sfc-pack
npm install -D vue-loader --force

Then, start your project as usual (with Symfony CLI, Docker, etc.) and don't forget to enable watch mode with npm run watch for compile assets and automatically re-compile when files change.

Keep Going!

Optional configuration

With this command you can configure webpack for silence the recommandation about "To create a smaller (and CSP-compliant) build" and for only use Vue Single-file component (see also: Runtime Compiler Build):

sed -i '' 's/\.enableVueLoader()/.enableVueLoader(() => {}, { runtimeCompilerBuild: false })/' webpack.config.js

Informations

With webpack-encore-bundle and without AssetMapper you can still use Stimulus & Symfony UX and Turbo!

You can also complete your pack with :

About

An other pack to install on top of the default Symfony skeleton, similar to symfony/webpack-pack but with Webpack instead of AssetMapper and able to compile .vue files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published