Skip to content

Commit

Permalink
fix(webpack): fix errors from webpack
Browse files Browse the repository at this point in the history
- change NODE_ENV to development (CHECK YOUR COMPONENTS FOR DEV)
- show child errors
  • Loading branch information
Oliver Müller committed May 7, 2021
1 parent b0707fe commit e89844e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/templates/pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<% if (cssinjs) { %>
require('./<%= filename %>.module')
<% } else { %>
if (process.env.NODE_ENV === 'dev') {
if (process.env.NODE_ENV === 'development') {
require('./<%= filename %>.module')
}
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FrontendModuleInstance } from "../../../../types"
<% if (cssinjs) { %>
require('./<%= filename %>.module')
<% } else { %>
if (process.env.NODE_ENV === 'dev') {
if (process.env.NODE_ENV === 'development') {
require('./<%= filename %>.module')
}
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jvmn/groundzero-taskrunner-webpack",
"version": "2.4.0",
"version": "2.4.1",
"description": "Taskrunner for JvM/Neckar Groundzero projects",
"keywords": [
"taskrunner",
Expand Down
7 changes: 4 additions & 3 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = merge(baseConfig, {
mode: 'development',
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'dev' // use 'development' unless process.env.NODE_ENV is defined
NODE_ENV: 'development' // use 'development' unless process.env.NODE_ENV is defined
}),
],
stats: {
Expand All @@ -28,12 +28,13 @@ module.exports = merge(baseConfig, {
cachedAssets: false,
entrypoints: false,
hash: false,
children: false,
children: true,
reasons: false,
version: false,
outputPath: false,
chunkOrigins: false,
colors: true
colors: true,
errorDetails: true
},
// https://webpack.js.org/configuration/devtool/ for other options
devtool: 'eval-cheap-source-map',
Expand Down

0 comments on commit e89844e

Please sign in to comment.