From b519d604be5ecc710d879d03d436a4efa7c092c0 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 15 Oct 2014 12:36:53 +0900 Subject: [PATCH] Fix module paths in webpack config and provide context so that it won't have any trouble finding them if run from a different directory. --- webpack.config.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index e193609b..5df2641e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,7 @@ var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin') module.exports = { webpack: { + context: __dirname, cache: true, entry: { app: pathutil.resource('app/app.js'), @@ -20,11 +21,13 @@ module.exports = { colors: true }, resolve: { + root: [ + pathutil.resource('app/components'), + ], modulesDirectories: [ - pathutil.resource('app/components') - , pathutil.resource('web_modules') - , pathutil.resource('bower_components') - , './node_modules' + 'web_modules', + 'bower_components', + 'node_modules', ], alias: { 'angular-bootstrap': 'angular-bootstrap/ui-bootstrap-tpls',