Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Replace kebabCase with change-case package
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Apr 20, 2023
1 parent be07aee commit 2e91696
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 1,186 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { kebabCase } from 'lodash';
import { paramCase as kebabCase } from 'change-case';
import { decodeEntities } from '@wordpress/html-entities';
import type { ProductResponseItemData } from '@woocommerce/types';

Expand Down
4 changes: 2 additions & 2 deletions bin/webpack-configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const path = require( 'path' );
const fs = require( 'fs' );
const { kebabCase } = require( 'lodash' );
const { paramCase } = require( 'change-case' );
const RemoveFilesPlugin = require( './remove-files-webpack-plugin' );
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
const ProgressBarPlugin = require( 'progress-bar-webpack-plugin' );
Expand Down Expand Up @@ -79,7 +79,7 @@ const getCoreConfig = ( options = {} ) => {
entry: getEntryConfig( 'core', options.exclude || [] ),
output: {
filename: ( chunkData ) => {
return `${ kebabCase( chunkData.chunk.name ) }.js`;
return `${ paramCase( chunkData.chunk.name ) }.js`;
},
path: path.resolve( __dirname, '../build/' ),
library: [ 'wc', '[name]' ],
Expand Down
Loading

0 comments on commit 2e91696

Please sign in to comment.