Skip to content

Commit

Permalink
Fix node env and add hashes for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
geowarin committed May 4, 2016
1 parent 818da91 commit 93be0e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/loaders/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = [
test: /\.woff(\?.*)?$/,
loader: 'url',
query: {
name: 'fonts/[name].[ext]',
name: 'fonts/[name]-[hash].[ext]',
limit: 10000,
mimetype: 'application/font-woff'
}
Expand All @@ -12,7 +12,7 @@ module.exports = [
test: /\.woff2(\?.*)?$/,
loader: 'url',
query: {
name: 'fonts/[name].[ext]',
name: 'fonts/[name]-[hash].[ext]',
limit: 10000,
mimetype: 'application/font-woff2'
}
Expand All @@ -21,7 +21,7 @@ module.exports = [
test: /\.ttf(\?.*)?$/,
loader: 'url',
query: {
name: 'fonts/[name].[ext]',
name: 'fonts/[name]-[hash].[ext]',
limit: 10000,
mimetype: 'application/octet-stream'
}
Expand All @@ -30,14 +30,14 @@ module.exports = [
test: /\.eot(\?.*)?$/,
loader: 'file',
query: {
name: 'fonts/[name].[ext]'
name: 'fonts/[name]-[hash].[ext]'
}
},
{
test: /\.svg(\?.*)?$/,
loader: 'url',
query: {
name: 'fonts/[name].[ext]',
name: 'fonts/[name]-[hash].[ext]',
limit: 10000,
mimetype: 'image/svg+xml'
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const webpack = require('webpack');

module.exports = function build(options) {
process.env['NODE_ENV'] = JSON.stringify('production');
process.env['NODE_ENV'] = 'production';
const config = require('../webpack/webpack.prod.config')(options);
webpack(config, (error, stats) => {
if (error) {
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const proxy = require('http-proxy-middleware');
const makeConfig = require('../webpack/webpack.dev.config');

module.exports = function start (options) {
process.env['NODE_ENV'] = JSON.stringify('development');
process.env['NODE_ENV'] = 'development';

const app = express();
const config = makeConfig(options);
Expand Down

0 comments on commit 93be0e4

Please sign in to comment.