Last active
February 9, 2020 16:15
-
-
Save voronkovich/b279107aa97ac7bd94da8186f2ab4213 to your computer and use it in GitHub Desktop.
Configuration for Symfony Encore VueJS single page app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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