Skip to content

Commit

Permalink
Rename bundleConfig variable to siteConfig variable
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Mar 12, 2018
1 parent 8bd610e commit 28c25c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions webpack.config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ const path = require('path');

Encore.reset();

const bundleConfig = {
const siteConfig = {
name: 'default',
buildLocation: Encore.isProduction() ? 'build' : 'build_dev',
resourcesLocation: ('./src/Netgen/Bundle/MoreDemoBundle/Resources/'),
resourcesLocation: ('./src/Netgen/Bundle/MoreDemoBundle/Resources'),
};

Encore
// the project directory where all compiled assets will be stored
.setOutputPath(`./web/${bundleConfig.buildLocation}/`)
.setOutputPath(`./web/${siteConfig.buildLocation}/`)

// the public path used by the web server to access the previous directory
.setPublicPath(`/${bundleConfig.buildLocation}`)
.setPublicPath(`/${siteConfig.buildLocation}`)

// will create public/build/app.js and public/build/app.css
.addEntry('app', `${bundleConfig.resourcesLocation}es6/app.js`)
.addEntry('app', `${siteConfig.resourcesLocation}/es6/app.js`)

// allow sass/scss files to be processed
.enableSassLoader((options) => {
Expand Down Expand Up @@ -55,7 +55,7 @@ if (Encore.isProduction()) {
const config = Encore.getWebpackConfig();

config.watchOptions = { poll: true, ignored: /node_modules/ };
config.name = bundleConfig.name;
config.name = siteConfig.name;

// export the final configuration
module.exports = config;

0 comments on commit 28c25c0

Please sign in to comment.