From 6795d7f360f3c84265debdae9ae8fe778502a8f2 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 21 Jul 2017 10:38:02 +0200 Subject: [PATCH] Fixes asked for by reviewers --- symfony/webpack-encore/0.9/package.json | 8 +++--- symfony/webpack-encore/0.9/webpack.config.js | 27 ++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/symfony/webpack-encore/0.9/package.json b/symfony/webpack-encore/0.9/package.json index c1f3a5ae..1f3a0936 100644 --- a/symfony/webpack-encore/0.9/package.json +++ b/symfony/webpack-encore/0.9/package.json @@ -3,9 +3,9 @@ "@symfony/webpack-encore": "^0.9.1" }, "scripts": { - "dev-server": "./node_modules/.bin/encore dev-server", - "dev": "./node_modules/.bin/encore dev", - "watch": "./node_modules/.bin/encore dev --watch", - "build": "./node_modules/.bin/encore production" + "dev-server": "encore dev-server", + "dev": "encore dev", + "watch": "encore dev --watch", + "build": "encore production" } } diff --git a/symfony/webpack-encore/0.9/webpack.config.js b/symfony/webpack-encore/0.9/webpack.config.js index dced1172..e36fa208 100644 --- a/symfony/webpack-encore/0.9/webpack.config.js +++ b/symfony/webpack-encore/0.9/webpack.config.js @@ -1,23 +1,24 @@ var Encore = require('@symfony/webpack-encore'); Encore - // directory where all compiled assets will be stored - .setOutputPath('web/build/') - // what's the public path to this directory (relative to your project's document root dir) + // the project directory where compiled assets will be stored + .setOutputPath('public/build/') + // the public path used by the web server to access the previous directory .setPublicPath('/build') - // empty the outputPath dir before each build .cleanupOutputBeforeBuild() - // allow sass/scss files to be processed - .enableSassLoader() .enableSourceMaps(!Encore.isProduction()) - // will output as web/build/app.js - // .addEntry('app', './assets/js/app.js') - // will output as web/build/global.css - // .addStyleEntry('global', './assets/css/app.scss') - // allow legacy applications to use $/jQuery as a global variable + // uncomment to create hashed filenames (e.g. app.abc123.css) + // .enableVersioning(Encore.isProduction()) + + // uncomment to define the assets of the project + // .addEntry('js/app', './assets/js/app.js') + // .addStyleEntry('css/app', './assets/css/app.scss') + + // uncomment if you use Sass/SCSS files + // .enableSassLoader() + + // uncomment for legacy applications that require $/jQuery as a global variable // .autoProvidejQuery() - // create hashed filenames (e.g. app.abc123.css) - // .enableVersioning() ; module.exports = Encore.getWebpackConfig();