Skip to content

Instantly share code, notes, and snippets.

@voronkovich
Last active February 9, 2020 16:15
Show Gist options
  • Save voronkovich/b279107aa97ac7bd94da8186f2ab4213 to your computer and use it in GitHub Desktop.
Save voronkovich/b279107aa97ac7bd94da8186f2ab4213 to your computer and use it in GitHub Desktop.
Configuration for Symfony Encore VueJS single page app
var Encore = require('@symfony/webpack-encore');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
.cleanupOutputBeforeBuild()
.disableSingleRuntimeChunk()
.enableVueLoader()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
;
module.exports = Encore.getWebpackConfig();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment