Skip to content

Commit cab3125

Browse files
Use dev build
1 parent 961d4ee commit cab3125

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.13.1",
55
"scripts": {
66
"start-plugin": "wp-scripts start",
7-
"plugin-build": "wp-scripts build",
7+
"plugin-build": "NODE_ENV=development wp-scripts build",
88
"linux:make-zip": "npm run plugin-build && zip -r logo_maker_plugin.zip index.php plugin_build && mv logo_maker_plugin.zip development/",
99
"font:all": "npm run font:config && npm run font:download",
1010
"font:config": "node development/createFontConfigFile.js",

Diff for: webpack.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ const path = require("path");
33
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
44
// const GoogleFontsPlugin = require("@beyonk/google-fonts-webpack-plugin")
55
// const webpackFonts = require("./webpack.fonts.json")
6+
const NODE_ENV = process.env.NODE_ENV || 'development';
67

78
module.exports = {
89
...defaultConfig,
10+
devtool: 'development' === NODE_ENV ? 'eval-source-map' : undefined,
11+
mode: NODE_ENV,
912
entry: {
1013
"index": "./wordpress/index.tsx",
1114
"logo-maker": "./src/index.tsx"
@@ -44,4 +47,4 @@ module.exports = {
4447
path: path.resolve(__dirname, "plugin_build"),
4548
clean: true
4649
}
47-
};
50+
};

0 commit comments

Comments
 (0)