File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 4
4
"version" : " 1.13.1" ,
5
5
"scripts" : {
6
6
"start-plugin" : " wp-scripts start" ,
7
- "plugin-build" : " wp-scripts build" ,
7
+ "plugin-build" : " NODE_ENV=development wp-scripts build" ,
8
8
"linux:make-zip" : " npm run plugin-build && zip -r logo_maker_plugin.zip index.php plugin_build && mv logo_maker_plugin.zip development/" ,
9
9
"font:all" : " npm run font:config && npm run font:download" ,
10
10
"font:config" : " node development/createFontConfigFile.js" ,
Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ const path = require("path");
3
3
const defaultConfig = require ( '@wordpress/scripts/config/webpack.config' ) ;
4
4
// const GoogleFontsPlugin = require("@beyonk/google-fonts-webpack-plugin")
5
5
// const webpackFonts = require("./webpack.fonts.json")
6
+ const NODE_ENV = process . env . NODE_ENV || 'development' ;
6
7
7
8
module . exports = {
8
9
...defaultConfig ,
10
+ devtool : 'development' === NODE_ENV ? 'eval-source-map' : undefined ,
11
+ mode : NODE_ENV ,
9
12
entry : {
10
13
"index" : "./wordpress/index.tsx" ,
11
14
"logo-maker" : "./src/index.tsx"
@@ -44,4 +47,4 @@ module.exports = {
44
47
path : path . resolve ( __dirname , "plugin_build" ) ,
45
48
clean : true
46
49
}
47
- } ;
50
+ } ;
You can’t perform that action at this time.
0 commit comments