Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Fix issue with undefined 'salesforce' variable. #3

Merged
merged 1 commit into from
Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generators/typescript/templates/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const plugins = [];
if (minimize) {
plugins.push(new webpack.optimize.UglifyJsPlugin());
}
<% if(salesforce) { %>
<% if (!(typeof salesforce === 'undefined' || salesforce === null)) { %>
const coveoComponentMock = `
<script src="../vendor/coveo/js/CoveoJsSearch.Lazy.js"></script>
<script src="../vendor/coveo/js/templates/templates.js"></script>
Expand All @@ -23,7 +23,7 @@ if (minimize) {

if (!production) {
plugins.push(new webpack.HotModuleReplacementPlugin());
<% if(salesforce) { %>
<% if (!(typeof salesforce === 'undefined' || salesforce === null)) { %>
plugins.push(new VisualforceHtmlPlugin({
SalesforceContext: {
CustomModifiers: {
Expand Down Expand Up @@ -62,4 +62,4 @@ module.exports = {
},
plugins: plugins,
bail: true
};
};