Skip to content

Commit eaea3de

Browse files
committed
2 parents 57e9187 + e8cf60b commit eaea3de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webpack.common.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ const fs = require('fs');
66

77
const paths = require('./webpack._paths')
88

9+
const isDevelopment = process.env.NODE_ENV !== 'production';
10+
911
const htmlBodyContent = fs.readFileSync(paths.src + '/html/content.html').toString();
1012

11-
const htmlHeader = "<script src='http://localhost:35729/livereload.js'></script>";
13+
const htmlHeader = isDevelopment ? "<script src='http://localhost:35729/livereload.js'></script>" : "";
1214

1315
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
1416
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
@@ -29,8 +31,6 @@ const scssEntries = scssFiles.map((filename) => {
2931
//load package.json
3032
const config = require('./package');
3133

32-
const isDevelopment = process.env.NODE_ENV !== 'production';
33-
3434
module.exports = {
3535
// Where webpack looks to start building the bundle
3636
entry: {

0 commit comments

Comments
 (0)