
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
visualforce-html-webpack-plugin
Advanced tools
A Webpack plugin to generate HTML file from Salesforce Visualforce page
A Webpack plugin to generate HTML file from Salesforce Visualforce pages. This is especially usefull to locally develop Visualforce pages without having to deploy to Salesforce.
Install the plugin with npm:
npm install --save-dev visualforce-html-webpack-plugin
The plugin will generate an HTML file for you for each Visualforce pages present in your workspace. Just add the plugin to your webpack config as follows:
var VisualforceHtmlPlugin = require('visualforce-html-webpack-plugin');
var webpackConfig = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [new VisualforceHtmlPlugin(/* config */)]
};
Since Visualforce pages can have multiple references to your Salesforce organization, it is possible to "mock" most of them using the VisualforceHtmlPlugin configuration file
var config = {
SalesforceContext: {
CustomModifiers: {
'<MyNameSpace:MyComponent.*?></MyNameSpace:MyComponent>':
`<script src="myscripts/mystuff.js"></script>
<link rel="stylesheet" href="mycss/mystuff.css"/>`
},
Resources: {
jquery: "jquery/dist/"
},
Controllers: {
MyController: {
foo: "bar",
fooFile: { file: "bar.json" }
}
}
}
};
This configuration will resolve $Resource.jquery and {!foo} in your pages allowing you to use the same <apex:stylesheet> and <apex:includeScript> imports you would in Salesforce.
The CustomModifiers option allow to specify a regex to match a resource in your Visualforce page, and the content with which to replace it.
FAQs
A Webpack plugin to generate HTML file from Salesforce Visualforce page
The npm package visualforce-html-webpack-plugin receives a total of 5 weekly downloads. As such, visualforce-html-webpack-plugin popularity was classified as not popular.
We found that visualforce-html-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.