Skip to content

Commit

Permalink
Prettier webpack config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Sep 20, 2024
1 parent 96a28a8 commit d2317ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/webpack/script-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const {
const scriptModules = new Map();
for ( const packageName of MODULES.concat( SCRIPT_AND_MODULE_DUAL_PACKAGES ) ) {
const packageRequire = createRequire(
`${dirname( require.resolve( `${ packageName }/package.json` ) )}/`
`${ dirname( require.resolve( `${ packageName }/package.json` ) ) }/`
);

const depPackageJson = packageRequire( './package.json' );
Expand Down Expand Up @@ -83,14 +83,17 @@ module.exports = function (
const baseConfig = getBaseConfig( env );
const config = {
...baseConfig,
entry: Object.fromEntries( scriptModules.entries()),
entry: Object.fromEntries( scriptModules.entries() ),
experiments: {
outputModule: true,
},
output: {
devtoolNamespace: 'wp',
filename: `[name]${ suffix }.js`,
path: normalizeJoin( baseDir, `${ buildTarget }/js/dist/script-modules` ),
path: normalizeJoin(
baseDir,
`${ buildTarget }/js/dist/script-modules`
),
library: {
type: 'module',
},
Expand Down

0 comments on commit d2317ab

Please sign in to comment.