From 609c56fe880f13036b033bd8a3d832379356e3ae Mon Sep 17 00:00:00 2001 From: Gigi Date: Fri, 22 Aug 2014 15:39:29 -0700 Subject: [PATCH 1/3] add missing resolve section --- templates/common/root/webpack.dist.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/common/root/webpack.dist.config.js b/templates/common/root/webpack.dist.config.js index 9d10a7f..f0a6cd3 100644 --- a/templates/common/root/webpack.dist.config.js +++ b/templates/common/root/webpack.dist.config.js @@ -31,6 +31,10 @@ module.exports = { new webpack.optimize.AggressiveMergingPlugin() ], + resolve: { + extensions: ['','.js','.jsx'] + }, + module: { preLoaders: [{ test: '\\.js$', From 26c229682de0da99dd829fc318058352885f1fad Mon Sep 17 00:00:00 2001 From: Theophile Villard Date: Sun, 24 Aug 2014 19:11:46 +0200 Subject: [PATCH 2/3] Use url-loader --- templates/common/Gruntfile.js | 6 +++--- templates/common/index.html | 2 +- templates/common/root/webpack.config.js | 3 ++- templates/common/root/webpack.dist.config.js | 4 ++-- templates/javascript/App.jsx | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/common/Gruntfile.js b/templates/common/Gruntfile.js index 0840e42..add91c7 100644 --- a/templates/common/Gruntfile.js +++ b/templates/common/Gruntfile.js @@ -13,7 +13,7 @@ module.exports = function (grunt) { // Read configuration from package.json var pkgConfig = grunt.file.readJSON('package.json'); - + grunt.initConfig({ pkg: pkgConfig, @@ -29,10 +29,10 @@ module.exports = function (grunt) { options: { port: 8000, webpack: webpackDevConfig, - publicPath: '/scripts/', + publicPath: '/assets/', contentBase: './<%= pkg.src %>/', }, - + start: { keepAlive: true, } diff --git a/templates/common/index.html b/templates/common/index.html index 654d53a..2e60775 100644 --- a/templates/common/index.html +++ b/templates/common/index.html @@ -14,6 +14,6 @@

If you can see this, something is broken (or JS is not enabled)!!.

- + diff --git a/templates/common/root/webpack.config.js b/templates/common/root/webpack.config.js index ca31e56..5e1c6fe 100644 --- a/templates/common/root/webpack.config.js +++ b/templates/common/root/webpack.config.js @@ -9,7 +9,8 @@ module.exports = { output: { - filename: 'main.js' + filename: 'main.js', + publicPath: '/assets/' }, cache: true, diff --git a/templates/common/root/webpack.dist.config.js b/templates/common/root/webpack.dist.config.js index 9d10a7f..b49a55f 100644 --- a/templates/common/root/webpack.dist.config.js +++ b/templates/common/root/webpack.dist.config.js @@ -10,8 +10,8 @@ var webpack = require('webpack'); module.exports = { output: { - publicPatch: 'dist/', - path: 'dist/scripts/', + publicPath: '/assets/', + path: 'dist/assets/', filename: 'main.js' }, diff --git a/templates/javascript/App.jsx b/templates/javascript/App.jsx index f0771d8..9518932 100644 --- a/templates/javascript/App.jsx +++ b/templates/javascript/App.jsx @@ -14,7 +14,7 @@ var ReactTransitionGroup = React.addons.TransitionGroup; require('../../styles/reset.css'); require('../../styles/main.css'); -var imageURL = '../../images/yeoman.png'; +var imageURL = require('../../images/yeoman.png'); var <%= scriptAppName %> = React.createClass({ render: function() { From 80089405acf1070c14c7199a9d666fc3edf30fd5 Mon Sep 17 00:00:00 2001 From: Simon Bailey Date: Mon, 1 Sep 2014 08:34:52 +0100 Subject: [PATCH 3/3] Version bump 0.0.10 Signed-off-by: Simon Bailey --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f73d8b6..e71dc83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-react-webpack", - "version": "0.0.9", + "version": "0.0.10", "description": "Yeoman generator for ReactJS and Webpack", "keywords": [ "yeoman-generator",