Skip to content

Commit

Permalink
feat(build): show pretty build status
Browse files Browse the repository at this point in the history
Using nuxt own `friendly-errors-webpack-plugin`
  • Loading branch information
medfreeman committed Sep 9, 2017
1 parent 6c51d10 commit c4107f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Utils } from "nuxt";
import webpack from "webpack";
import HTMLPlugin from "html-webpack-plugin";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import FriendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin";

export default function webpackNetlifyCmsConfig(
name,
Expand Down Expand Up @@ -67,9 +68,14 @@ export default function webpackNetlifyCmsConfig(
};

// --------------------------------------
// Production specific config
// Development specific config
// --------------------------------------
if (!nuxtOptions.dev) {
if (nuxtOptions.dev) {
config.plugins.push(new FriendlyErrorsWebpackPlugin());
} else {
// --------------------------------------
// Production specific config
// --------------------------------------
// CSS extraction
config.plugins.push(
new ExtractTextPlugin({
Expand Down

0 comments on commit c4107f2

Please sign in to comment.