Webpack SFDC Deploy Plugin
It is great to use the plugin with Webpack
--watch parameter to deploy the application
right after Webpack has updated it.
Maintainer: Ruslan Kurchenko @henkookdev
Install the plugin with npm:
$ npm install webpack-sfdc-deploy-plugin --save-dev
To successfully deploy your resources to Salesforce you need to provide credentials.
.js file with next format:
moduleexports =username: '<email@example.com>'password: '<password>'token: '<security token>';
How to get a security token for your Salesforce org you can see here
You need pass a hash of configuration options to
Required values are as follows:
credentialsPath: The relative path to
.jsfile with credentials to you Salesforce org.
filesFolderPath: The relative path to the folder where placed files that need to be deployed.
staticResourceName: The title name that will be used for creating/updating the
StaticResourceon Salesforce org side.
var path = ;var SfdcDeployPlugin = ;var webpackConfig =entry: 'index.js'output:path: 'dist'filename: 'bundle.js'plugins:credentialsPath: pathfilesFolderPath : pathstaticResourceName : 'AwesomeApplication';
This will create/update
StaticResource with the name AwesomeApplication including all files that are in the
using Salesforce credentials that are placed in
The plugin has next optional configuration:
exclude: The array of Strings/RegExp to exclude files from deploying.
include: The array of Strings/RegExp to include only certain files to deploying. This option overrides
srcFolderPath: The relative path to the src folder with Salesforce project metadata. If this option provided the plugin will search for old version of static resource and replace it with a newly bundled. (search for
Also, you can provide only String/RegExp instead of array -
- You can mix full file names with RegExp:
exclude: ['vendor.bundle.js', /.js.map/]
- The ability to deploy folders that are placed in deployment folder, for example -
- The option to use Salesforce
Tooling APIinstead of
- The option to see logs about deployment process
This project is licensed under MIT.