Skip to content

Commit 567fd5b

Browse files
committed
cleanup
1 parent 9ca130e commit 567fd5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

webpack.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const path = require('path');
33
const webpack = require('webpack');
44
const merge = require('webpack-merge');
5+
const pkg = require("./package.json");
56

67
module.exports = merge.smart(require('./webpack.base.js'), {
78
mode: 'development',
@@ -28,7 +29,7 @@ module.exports = merge.smart(require('./webpack.base.js'), {
2829
},
2930
plugins: [
3031
new webpack.DefinePlugin({
31-
NETLIFY_CMS_VERSION: JSON.stringify(require("./package.json").version + "-dev"),
32+
NETLIFY_CMS_VERSION: JSON.stringify(pkg.version + "-dev"),
3233
}),
3334
new webpack.NoEmitOnErrorsPlugin(),
3435
],

webpack.prod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path = require('path');
33
const webpack = require('webpack');
44
const merge = require('webpack-merge');
55
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
6+
const pkg = require("./package.json");
67

78
module.exports = merge.smart(require('./webpack.base.js'), {
89
mode: 'production',
@@ -19,7 +20,7 @@ module.exports = merge.smart(require('./webpack.base.js'), {
1920
context: path.join(__dirname, 'src'),
2021
plugins: [
2122
new webpack.DefinePlugin({
22-
NETLIFY_CMS_VERSION: JSON.stringify(require("./package.json").version),
23+
NETLIFY_CMS_VERSION: JSON.stringify(pkg.version),
2324
}),
2425

2526
// Extract CSS

0 commit comments

Comments
 (0)