File tree Expand file tree Collapse file tree 4 files changed +4
-13
lines changed Expand file tree Collapse file tree 4 files changed +4
-13
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5656 "find-up" : " ^5.0.0" ,
5757 "gradient-string" : " ^1.2.0" ,
5858 "handlebars" : " ^4.7.7" ,
59- "json2php" : " ^0.0.4" ,
6059 "less-loader" : " 7.3.0" ,
6160 "lockfile" : " ^1.0.4" ,
6261 "log-symbols" : " ^4.0.0" ,
Original file line number Diff line number Diff line change 11/* eslint-disable no-restricted-syntax */
22import webpack , { Compiler } from 'webpack' ;
3- import json2php from 'json2php' ;
43import path from 'path' ;
54import fs from 'fs' ;
65
@@ -86,7 +85,7 @@ export class DependencyExtractionWebpackPlugin {
8685 }
8786
8887 stringify ( asset : any ) {
89- return `<?php return ${ json2php ( JSON . parse ( JSON . stringify ( asset ) ) ) } ;` ;
88+ return JSON . stringify ( asset , null , 2 ) ;
9089 }
9190
9291 /**
@@ -144,7 +143,9 @@ export class DependencyExtractionWebpackPlugin {
144143
145144 const assetString = this . stringify ( assetData ) ;
146145
147- const fileName = `${ entrypointName . split ( '?' , 2 ) [ 0 ] } .dependencies.wp.php` ;
146+ const fileName = `${
147+ entrypointName . split ( '?' , 2 ) [ 0 ]
148+ } .dependencies.wp.json`;
148149 const outputPath = path . resolve (
149150 this . compiler . outputPath ,
150151 this . options . appDir ,
Original file line number Diff line number Diff line change @@ -7961,11 +7961,6 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
79617961 resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
79627962 integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
79637963
7964- json2php@^0.0.4:
7965- version "0.0.4"
7966- resolved "https://registry.yarnpkg.com/json2php/-/json2php-0.0.4.tgz#6bd85a1dda6a5dd7e91022bb24403cc1b7c2ee34"
7967- integrity sha1-a9haHdpqXdfpECK7JEA8wbfC7jQ=
7968-
79697964json5@^1.0.1:
79707965 version "1.0.1"
79717966 resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
You can’t perform that action at this time.
0 commit comments