sfcc-webpackhelper
v1.1.0
Published
Contains helper functions for use in webpack configs for Salesforce Commerce Cloud projects
Downloads
7
Readme
#sfcc-webpackhelper
This package contains helper methods to use in webpack.config.js for Salesforce B2C Commerce Cloud projects, for example createJSPath maps client/js files in cartridge and locale directories to the correct corresponding directories in the static/js directory.
##createJSPath
This function takes cartridges as an argument and outputs an object map that can be used as webpack entry Object. It can optionally receive a second argument of an array of directory names. It expects these directories to be SFCC repositories in the parent directory of the working directory. It will open the package.json in these repos to find the cartridges in the repo. It will output the compiled files in these cartridges to the static map in the first cartridge in the cartridges array passed to the function.