Skip to content

Commit c4107f2

Browse files
committed
feat(build): show pretty build status
Using nuxt own `friendly-errors-webpack-plugin`
1 parent 6c51d10 commit c4107f2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/webpack.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Utils } from "nuxt";
77
import webpack from "webpack";
88
import HTMLPlugin from "html-webpack-plugin";
99
import ExtractTextPlugin from "extract-text-webpack-plugin";
10+
import FriendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin";
1011

1112
export default function webpackNetlifyCmsConfig(
1213
name,
@@ -67,9 +68,14 @@ export default function webpackNetlifyCmsConfig(
6768
};
6869

6970
// --------------------------------------
70-
// Production specific config
71+
// Development specific config
7172
// --------------------------------------
72-
if (!nuxtOptions.dev) {
73+
if (nuxtOptions.dev) {
74+
config.plugins.push(new FriendlyErrorsWebpackPlugin());
75+
} else {
76+
// --------------------------------------
77+
// Production specific config
78+
// --------------------------------------
7379
// CSS extraction
7480
config.plugins.push(
7581
new ExtractTextPlugin({

0 commit comments

Comments
 (0)