This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Router, CustomCacheKey } = require('@layer0/core/router'); | |
const deriveSurrogateKeysFromJson = | |
require('@layer0/core/router/deriveSurrogateKeysFromJson').default; | |
const { renderNuxtPage, nuxtRoutes } = require('@layer0/nuxt'); | |
const get = require('lodash/get'); | |
const qs = require('qs'); | |
const purgeShopify = require('./webhooks/shopify'); | |
const purgePrismic = require('./webhooks/prismic'); | |
const cacheableGraphqlOperation = (queryName, accessor) => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// Build JS with Rollup | |
// --------------------------------------- | |
gulp.task('js', ['lint-js'], () => { | |
console.log('*** Compiling JS ***'.green); | |
return rollup.rollup({ | |
entry: "./src/js/theme.js", | |
plugins: [ | |
resolve({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
See https://docs.shopify.com/themes/customization/products/how-to-add-a-pick-an-option-to-drop-downs | |
{% endcomment %} | |
{% unless product.selected_variant %} | |
{% if product.variants.size > 1 %} | |
<script> | |
var $addToCartForm = $('form[action="/cart/add"]'); | |
if (window.MutationObserver && $addToCartForm.length) { | |
if (typeof observer === 'object' && typeof observer.disconnect === 'function') { |