Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
Add file-loader support for static assets in subdirectories. Log serv…
Browse files Browse the repository at this point in the history
…er-side Transmit errors.
  • Loading branch information
Rick committed Feb 22, 2016
1 parent aa09cf5 commit 42b50f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/webpack.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
module: {
loaders: [
{test: /\.json$/, loaders: ["json"]},
{test: /\.(ico|gif|png|jpg|jpeg|svg|webp|ttf|eot|woff|woff2)$/, loaders: ["file?name=/[name].[ext]"]}
{test: /\.(ico|gif|png|jpg|jpeg|svg|webp)$/, loaders: ["file?context=static&name=/[path][name].[ext]"]}
],
postLoaders: [
{test: /\.js$/, loaders: ["babel?presets[]=es2015&presets[]=stage-0&presets[]=react"], exclude: /node_modules/}
Expand Down
2 changes: 1 addition & 1 deletion configs/webpack.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
module: {
loaders: [
{test: /\.json$/, loaders: ["json"]},
{test: /\.(ico|gif|png|jpg|jpeg|svg|webp|ttf|eot|woff|woff2)$/, loaders: ["file?name=/[name].[ext]"]}
{test: /\.(ico|gif|png|jpg|jpeg|svg|webp)$/, loaders: ["file?context=static&name=/[path][name].[ext]"]}
],
postLoaders: [
{test: /\.js$/, loaders: ["babel?presets[]=es2015&presets[]=stage-0&presets[]=react"], exclude: /node_modules/}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-isomorphic-starterkit",
"description": "Isomorphic starterkit with server-side React rendering.",
"version": "5.3.0",
"version": "5.3.1",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ try {
this.body = Transmit.injectIntoMarkup(template, reactData, [`${webserver}/dist/client.js`]);

callback(null);
}).catch(e => {
callback(e);
});
});
});
Expand Down

0 comments on commit 42b50f2

Please sign in to comment.