You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/b2b-edition/docs/buyer-portal/stencil.mdx
+2-18Lines changed: 2 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,31 +102,15 @@ For the following steps, you must know in advance the URL where your build files
102
102
*When re-building and re-deploying your custom Buyer Portal, you should clear the local contents of `.turbo/cache` before running `yarn build` to ensure that all updated code is reflected in the build. Also make sure to update your scripts in Script Manager again after deploying your new build files.*
103
103
</Callout>
104
104
105
-
### Deploying with WebDAV
106
-
107
-
Your BigCommerce store’s [WebDAV storage](https://support.bigcommerce.com/s/article/File-Access-WebDAV) can be a viable option for serving your custom B2B Buyer Portal files without sourcing a third-party CDN.
108
-
109
-
Follow the instructions in the above support article to learn about enabling WebDAV and connecting with a client like Cyberduck. Once you’re connected, you can use your store’s WebDAV as the upload destination for the steps described in Building and Deploying.
110
-
111
-
The directory `content` should be used for static files of this nature. Let’s say you intend to upload the build files from `dist` into `content/b2b` on your store’s WebDAV. This will make your Buyer Portal files available at the following URL:
112
-
113
-
`https://{my-store}.com/content/b2b/`
114
-
115
-
The files can also be accessed via the store’s canonical URL, in this format:
Either of these should be used as the value of `VITE_ASSETS_ABSOLUTE_PATH` before running `yarn build`, and the same value should be utilized when updating the scripts in Script Manager.
120
-
121
105
### Versioning Strategy
122
106
123
-
As mentioned above, by default the build process includes a hash in the filename of several key files. If you’re hosting your build files on your store’s WebDAV, for example, the following would be an example of the final URL of such a file:
107
+
As mentioned above, by default the build process includes a hash in the filename of several key files. For example, the final URL of your index file may use this structure:
This is a file-based strategy for avoiding stale cached files being served to shoppers. Upon a new build/deploy, you *must* make sure to update each file URL referenced in Script Manager each time you deploy new Buyer Portal build files.
128
112
129
-
Another strategy is to include a unique identifier in the *subdirectory* of your deployed location rather than in each individual filename. For example, say you configure `VITE_DISABLE_BUILD_HASH` to `TRUE` before building (resulting in filenames without a hash) and then upload the build files to a subdirectory of your store’s WebDAV that includes a date-based string. This could result in URLs like the following:
113
+
Another strategy is to include a unique identifier in the *subdirectory* of your deployed location rather than in each individual filename. For example, say you configure `VITE_DISABLE_BUILD_HASH` to `TRUE` before building (resulting in filenames without a hash) and then upload the build files to a subdirectory of your hosting provider that includes a date-based string. This could result in URLs like the following:
0 commit comments