diff --git a/RoboFile.php b/RoboFile.php index 11c5cc936e..9c43104404 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -47,6 +47,10 @@ class RoboFile extends \Robo\Tasks { ->run(); } + function watchJs() { + $this->_exec('./node_modules/webpack/bin/webpack.js --watch'); + } + function compileAll() { $this->compileJs(); $this->compileCss(); diff --git a/webpack.config.js b/webpack.config.js index 60214c2b79..e05281227f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,10 @@ var webpack = require('webpack'), baseConfig = { context: __dirname, + watch: { + aggregateTimeout: 300, + poll: true + }, output: { path: './assets/js', filename: '[name].js', @@ -84,7 +88,8 @@ config.push(_.extend({}, baseConfig, { 'newsletters/newsletters.jsx', 'segments/segments.jsx', 'forms/forms.jsx', - 'settings/tabs.js' + 'settings/tabs.js', + 'import/import.js' ], form_editor: [ 'form_editor/form_editor.js',