Laravel-mix: Can not use extracted js after set extract().

Created on 2 Jan 2019  路  6Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 4.0.8
  • Node Version (node -v): 10.13.0
  • NPM Version (npm -v): 6.5.0
  • OS: macOS 10.14.2

Description:

Can successfully compile when I set extract(), but extracted packages is no work in the first compile.

Steps To Reproduce:

  1. My webpack.mix.js
const mix = require('laravel-mix');
// skip ...
mix.js('resources/assets/js/app.js', 'public/js/app.js').
    extract(['vue', 'axios'], 'public/js/vendor.js').
    autoload({
      vue: ['Vue', 'window.vue'],
      axios: ['axios', 'window.axios'],
    });
  1. run npm run watch or prod or dev

    Always compile success.

  2. In my web. Chrome dev tool throw this error massage, No matter how I refresh those pages, cannot resolve this problem.
    2019-01-02 6 37 24

Uncaught TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (manifest.js:79)
    at eval (Vuetable.vue?5f93:1)
    at Object../node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/vuetable-2/src/components/Vuetable.vue?vue&type=style&index=0&id=15965e3b&scoped=true&lang=css& (vendor.js:320)
    at __webpack_require__ (manifest.js:79)
    at eval (Vuetable.vue?43cd:2)
    at Object../node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/vuetable-2/src/components/Vuetable.vue?vue&type=style&index=0&id=15965e3b&scoped=true&lang=css& (vendor.js:397)
    at __webpack_require__ (manifest.js:79)
    at eval (Vuetable.vue?925a:1)
    at Module../node_modules/vuetable-2/src/components/Vuetable.vue?vue&type=style&index=0&id=15965e3b&scoped=true&lang=css& (vendor.js:999)
    at __webpack_require__ (manifest.js:79)
vue.common.js?5ee5:8683 

You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html

pageLoading.vue?ade5:1 Uncaught TypeError: __webpack_require__(...) is not a function
    at eval (pageLoading.vue?ade5:1)
    at Object../node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/lib/loader.js?!./node_modules/vue-loader/lib/index.js?!./resources/assets/js/components/pageLoading.vue?vue&type=style&index=0&lang=scss& (home.js:33)
    at __webpack_require__ (manifest.js:79)
    at eval (pageLoading.vue?110a:2)
    at Object../node_modules/style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/lib/loader.js?!./node_modules/vue-loader/lib/index.js?!./resources/assets/js/components/pageLoading.vue?vue&type=style&index=0&lang=scss& (home.js:88)
    at __webpack_require__ (manifest.js:79)
    at eval (pageLoading.vue?b59f:1)
    at Module../resources/assets/js/components/pageLoading.vue?vue&type=style&index=0&lang=scss& (home.js:180)
    at __webpack_require__ (manifest.js:79)
    at eval (pageLoading.vue?dce3:1)
  1. But, when I trigger npm watch and recompile all js files, extracted packages is work up.

I don't know why can work after the second compile.

stale

Most helpful comment

I am still experiencing the issues as described above. Is there any update?

If I use .extract(['vue']) I am running in to issues.

All 6 comments

I'm running into the same issue. When I comment 'vue' out of the .extract([...]) method in webpack.mix.js it works. I attempted to replicate this issue on a new project and it worked fine. My guess is there is a versioning issue in node_modules or something... still unsure what the issue is.

npm run watch works fine with 'vue' left in .extract([...])... this error only occurs with dev and prod.

This is git diff public/js/app.js result from I run npm run watch and the second compile. I think these are the reason why the first compile is no work.

diff --git a/public/js/app.js b/public/js/app.js
index 97df1ac..4e0e617 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -701,6 +701,93 @@ __webpack_require__.r(__webpack_exports__);
   mixins: [vuetable_2_src_components_VuetablePaginationMixin__WEBPACK_IMPORTED_MODULE_0__["default"]]
 });

+/***/ }),
+
+/***/ "./node_modules/css-loader/lib/css-base.js":
+/*!*************************************************!*\
+  !*** ./node_modules/css-loader/lib/css-base.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/*
+   MIT License http://www.opensource.org/licenses/mit-license.php
+   Author Tobias Koppers @sokra
+*/
+// css base code, injected by the css-loader
+module.exports = function(useSourceMap) {
+   var list = [];
+
+   // return the list of modules as css string
+   list.toString = function toString() {
+       return this.map(function (item) {
+           var content = cssWithMappingToString(item, useSourceMap);
+           if(item[2]) {
+               return "@media " + item[2] + "{" + content + "}";
+           } else {
+               return content;
+           }
+       }).join("");
+   };
+
+   // import a list of modules into the list
+   list.i = function(modules, mediaQuery) {
+       if(typeof modules === "string")
+           modules = [[null, modules, ""]];
+       var alreadyImportedModules = {};
+       for(var i = 0; i < this.length; i++) {
+           var id = this[i][0];
+           if(typeof id === "number")
+               alreadyImportedModules[id] = true;
+       }
+       for(i = 0; i < modules.length; i++) {
+           var item = modules[i];
+           // skip already imported module
+           // this implementation is not 100% perfect for weird media query combinations
+           //  when a module is imported multiple times with different media queries.
+           //  I hope this will never occur (Hey this way we have smaller bundles)
+           if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
+               if(mediaQuery && !item[2]) {
+                   item[2] = mediaQuery;
+               } else if(mediaQuery) {
+                   item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
+               }
+               list.push(item);
+           }
+       }
+   };
+   return list;
+};
+
+function cssWithMappingToString(item, useSourceMap) {
+   var content = item[1] || '';
+   var cssMapping = item[3];
+   if (!cssMapping) {
+       return content;
+   }
+
+   if (useSourceMap && typeof btoa === 'function') {
+       var sourceMapping = toComment(cssMapping);
+       var sourceURLs = cssMapping.sources.map(function (source) {
+           return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
+       });
+
+       return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
+   }
+
+   return [content].join('\n');
+}
+
+// Adapted from convert-source-map (MIT)
+function toComment(sourceMap) {
+   // eslint-disable-next-line no-undef
+   var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
+   var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
+
+   return '/*# ' + data + ' */';
+}
+
+
 /***/ }),

 /***/ "./node_modules/is-buffer/index.js":
@@ -18498,6 +18585,515 @@ process.umask = function() { return 0; };

 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))

+/***/ }),
+
+/***/ "./node_modules/style-loader/lib/addStyles.js":
+/*!****************************************************!*\
+  !*** ./node_modules/style-loader/lib/addStyles.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/*
+   MIT License http://www.opensource.org/licenses/mit-license.php
+   Author Tobias Koppers @sokra
+*/
+
+var stylesInDom = {};
+
+var    memoize = function (fn) {
+   var memo;
+
+   return function () {
+       if (typeof memo === "undefined") memo = fn.apply(this, arguments);
+       return memo;
+   };
+};
+
+var isOldIE = memoize(function () {
+   // Test for IE <= 9 as proposed by Browserhacks
+   // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
+   // Tests for existence of standard globals is to allow style-loader
+   // to operate correctly into non-standard environments
+   // @see https://github.com/webpack-contrib/style-loader/issues/177
+   return window && document && document.all && !window.atob;
+});
+
+var getTarget = function (target, parent) {
+  if (parent){
+    return parent.querySelector(target);
+  }
+  return document.querySelector(target);
+};
+
+var getElement = (function (fn) {
+   var memo = {};
+
+   return function(target, parent) {
+                // If passing function in options, then use it for resolve "head" element.
+                // Useful for Shadow Root style i.e
+                // {
+                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
+                // }
+                if (typeof target === 'function') {
+                        return target();
+                }
+                if (typeof memo[target] === "undefined") {
+           var styleTarget = getTarget.call(this, target, parent);
+           // Special case to return head of iframe instead of iframe itself
+           if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
+               try {
+                   // This will throw an exception if access to iframe is blocked
+                   // due to cross-origin restrictions
+                   styleTarget = styleTarget.contentDocument.head;
+               } catch(e) {
+                   styleTarget = null;
+               }
+           }
+           memo[target] = styleTarget;
+       }
+       return memo[target]
+   };
+})();
+
+var singleton = null;
+var    singletonCounter = 0;
+var    stylesInsertedAtTop = [];
+
+var    fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");
+
+module.exports = function(list, options) {
+   if (typeof DEBUG !== "undefined" && DEBUG) {
+       if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
+   }
+
+   options = options || {};
+
+   options.attrs = typeof options.attrs === "object" ? options.attrs : {};
+
+   // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
+   // tags it will allow on a page
+   if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
+
+   // By default, add <style> tags to the <head> element
+        if (!options.insertInto) options.insertInto = "head";
+
+   // By default, add <style> tags to the bottom of the target
+   if (!options.insertAt) options.insertAt = "bottom";
+
+   var styles = listToStyles(list, options);
+
+   addStylesToDom(styles, options);
+
+   return function update (newList) {
+       var mayRemove = [];
+
+       for (var i = 0; i < styles.length; i++) {
+           var item = styles[i];
+           var domStyle = stylesInDom[item.id];
+
+           domStyle.refs--;
+           mayRemove.push(domStyle);
+       }
+
+       if(newList) {
+           var newStyles = listToStyles(newList, options);
+           addStylesToDom(newStyles, options);
+       }
+
+       for (var i = 0; i < mayRemove.length; i++) {
+           var domStyle = mayRemove[i];
+
+           if(domStyle.refs === 0) {
+               for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
+
+               delete stylesInDom[domStyle.id];
+           }
+       }
+   };
+};
+
+function addStylesToDom (styles, options) {
+   for (var i = 0; i < styles.length; i++) {
+       var item = styles[i];
+       var domStyle = stylesInDom[item.id];
+
+       if(domStyle) {
+           domStyle.refs++;
+
+           for(var j = 0; j < domStyle.parts.length; j++) {
+               domStyle.parts[j](item.parts[j]);
+           }
+
+           for(; j < item.parts.length; j++) {
+               domStyle.parts.push(addStyle(item.parts[j], options));
+           }
+       } else {
+           var parts = [];
+
+           for(var j = 0; j < item.parts.length; j++) {
+               parts.push(addStyle(item.parts[j], options));
+           }
+
+           stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
+       }
+   }
+}
+
+function listToStyles (list, options) {
+   var styles = [];
+   var newStyles = {};
+
+   for (var i = 0; i < list.length; i++) {
+       var item = list[i];
+       var id = options.base ? item[0] + options.base : item[0];
+       var css = item[1];
+       var media = item[2];
+       var sourceMap = item[3];
+       var part = {css: css, media: media, sourceMap: sourceMap};
+
+       if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
+       else newStyles[id].parts.push(part);
+   }
+
+   return styles;
+}
+
+function insertStyleElement (options, style) {
+   var target = getElement(options.insertInto)
+
+   if (!target) {
+       throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
+   }
+
+   var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
+
+   if (options.insertAt === "top") {
+       if (!lastStyleElementInsertedAtTop) {
+           target.insertBefore(style, target.firstChild);
+       } else if (lastStyleElementInsertedAtTop.nextSibling) {
+           target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
+       } else {
+           target.appendChild(style);
+       }
+       stylesInsertedAtTop.push(style);
+   } else if (options.insertAt === "bottom") {
+       target.appendChild(style);
+   } else if (typeof options.insertAt === "object" && options.insertAt.before) {
+       var nextSibling = getElement(options.insertAt.before, target);
+       target.insertBefore(style, nextSibling);
+   } else {
+       throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
+   }
+}
+
+function removeStyleElement (style) {
+   if (style.parentNode === null) return false;
+   style.parentNode.removeChild(style);
+
+   var idx = stylesInsertedAtTop.indexOf(style);
+   if(idx >= 0) {
+       stylesInsertedAtTop.splice(idx, 1);
+   }
+}
+
+function createStyleElement (options) {
+   var style = document.createElement("style");
+
+   if(options.attrs.type === undefined) {
+       options.attrs.type = "text/css";
+   }
+
+   if(options.attrs.nonce === undefined) {
+       var nonce = getNonce();
+       if (nonce) {
+           options.attrs.nonce = nonce;
+       }
+   }
+
+   addAttrs(style, options.attrs);
+   insertStyleElement(options, style);
+
+   return style;
+}
+
+function createLinkElement (options) {
+   var link = document.createElement("link");
+
+   if(options.attrs.type === undefined) {
+       options.attrs.type = "text/css";
+   }
+   options.attrs.rel = "stylesheet";
+
+   addAttrs(link, options.attrs);
+   insertStyleElement(options, link);
+
+   return link;
+}
+
+function addAttrs (el, attrs) {
+   Object.keys(attrs).forEach(function (key) {
+       el.setAttribute(key, attrs[key]);
+   });
+}
+
+function getNonce() {
+   if (false) {}
+
+   return __webpack_require__.nc;
+}
+
+function addStyle (obj, options) {
+   var style, update, remove, result;
+
+   // If a transform function was defined, run it on the css
+   if (options.transform && obj.css) {
+       result = typeof options.transform === 'function'
+        ? options.transform(obj.css) 
+        : options.transform.default(obj.css);
+
+       if (result) {
+           // If transform returns a value, use that instead of the original css.
+           // This allows running runtime transformations on the css.
+           obj.css = result;
+       } else {
+           // If the transform function returns a falsy value, don't add this css.
+           // This allows conditional loading of css
+           return function() {
+               // noop
+           };
+       }
+   }
+
+   if (options.singleton) {
+       var styleIndex = singletonCounter++;
+
+       style = singleton || (singleton = createStyleElement(options));
+
+       update = applyToSingletonTag.bind(null, style, styleIndex, false);
+       remove = applyToSingletonTag.bind(null, style, styleIndex, true);
+
+   } else if (
+       obj.sourceMap &&
+       typeof URL === "function" &&
+       typeof URL.createObjectURL === "function" &&
+       typeof URL.revokeObjectURL === "function" &&
+       typeof Blob === "function" &&
+       typeof btoa === "function"
+   ) {
+       style = createLinkElement(options);
+       update = updateLink.bind(null, style, options);
+       remove = function () {
+           removeStyleElement(style);
+
+           if(style.href) URL.revokeObjectURL(style.href);
+       };
+   } else {
+       style = createStyleElement(options);
+       update = applyToTag.bind(null, style);
+       remove = function () {
+           removeStyleElement(style);
+       };
+   }
+
+   update(obj);
+
+   return function updateStyle (newObj) {
+       if (newObj) {
+           if (
+               newObj.css === obj.css &&
+               newObj.media === obj.media &&
+               newObj.sourceMap === obj.sourceMap
+           ) {
+               return;
+           }
+
+           update(obj = newObj);
+       } else {
+           remove();
+       }
+   };
+}
+
+var replaceText = (function () {
+   var textStore = [];
+
+   return function (index, replacement) {
+       textStore[index] = replacement;
+
+       return textStore.filter(Boolean).join('\n');
+   };
+})();
+
+function applyToSingletonTag (style, index, remove, obj) {
+   var css = remove ? "" : obj.css;
+
+   if (style.styleSheet) {
+       style.styleSheet.cssText = replaceText(index, css);
+   } else {
+       var cssNode = document.createTextNode(css);
+       var childNodes = style.childNodes;
+
+       if (childNodes[index]) style.removeChild(childNodes[index]);
+
+       if (childNodes.length) {
+           style.insertBefore(cssNode, childNodes[index]);
+       } else {
+           style.appendChild(cssNode);
+       }
+   }
+}
+
+function applyToTag (style, obj) {
+   var css = obj.css;
+   var media = obj.media;
+
+   if(media) {
+       style.setAttribute("media", media)
+   }
+
+   if(style.styleSheet) {
+       style.styleSheet.cssText = css;
+   } else {
+       while(style.firstChild) {
+           style.removeChild(style.firstChild);
+       }
+
+       style.appendChild(document.createTextNode(css));
+   }
+}
+
+function updateLink (link, options, obj) {
+   var css = obj.css;
+   var sourceMap = obj.sourceMap;
+
+   /*
+       If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
+       and there is no publicPath defined then lets turn convertToAbsoluteUrls
+       on by default.  Otherwise default to the convertToAbsoluteUrls option
+       directly
+   */
+   var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
+
+   if (options.convertToAbsoluteUrls || autoFixUrls) {
+       css = fixUrls(css);
+   }
+
+   if (sourceMap) {
+       // http://stackoverflow.com/a/26603875
+       css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
+   }
+
+   var blob = new Blob([css], { type: "text/css" });
+
+   var oldSrc = link.href;
+
+   link.href = URL.createObjectURL(blob);
+
+   if(oldSrc) URL.revokeObjectURL(oldSrc);
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/lib/urls.js":
+/*!***********************************************!*\
+  !*** ./node_modules/style-loader/lib/urls.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+
+/**
+ * When source maps are enabled, `style-loader` uses a link element with a data-uri to
+ * embed the css on the page. This breaks all relative urls because now they are relative to a
+ * bundle instead of the current page.
+ *
+ * One solution is to only use full urls, but that may be impossible.
+ *
+ * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
+ *
+ * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
+ *
+ */
+
+module.exports = function (css) {
+  // get current location
+  var location = typeof window !== "undefined" && window.location;
+
+  if (!location) {
+    throw new Error("fixUrls requires window.location");
+  }
+
+   // blank or null?
+   if (!css || typeof css !== "string") {
+     return css;
+  }
+
+  var baseUrl = location.protocol + "//" + location.host;
+  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
+
+   // convert each url(...)
+   /*
+   This regular expression is just a way to recursively match brackets within
+   a string.
+
+    /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
+      (  = Start a capturing group
+        (?:  = Start a non-capturing group
+            [^)(]  = Match anything that isn't a parentheses
+            |  = OR
+            \(  = Match a start parentheses
+                (?:  = Start another non-capturing groups
+                    [^)(]+  = Match anything that isn't a parentheses
+                    |  = OR
+                    \(  = Match a start parentheses
+                        [^)(]*  = Match anything that isn't a parentheses
+                    \)  = Match a end parentheses
+                )  = End Group
+              *\) = Match anything and then a close parens
+          )  = Close non-capturing group
+          *  = Match anything
+       )  = Close capturing group
+    \)  = Match a close parens
+
+    /gi  = Get all matches, not the first.  Be case insensitive.
+    */
+   var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
+       // strip quotes (if they exist)
+       var unquotedOrigUrl = origUrl
+           .trim()
+           .replace(/^"(.*)"$/, function(o, $1){ return $1; })
+           .replace(/^'(.*)'$/, function(o, $1){ return $1; });
+
+       // already a full url? no change
+       if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
+         return fullMatch;
+       }
+
+       // convert the url to a full url
+       var newUrl;
+
+       if (unquotedOrigUrl.indexOf("//") === 0) {
+           //TODO: should we add protocol?
+           newUrl = unquotedOrigUrl;
+       } else if (unquotedOrigUrl.indexOf("/") === 0) {
+           // path should be relative to the base url
+           newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
+       } else {
+           // path should be relative to current directory
+           newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
+       }
+
+       // send back the fixed url(...)
+       return "url(" + JSON.stringify(newUrl) + ")";
+   });
+
+   // send back the fixed css
+   return fixedCss;
+};
+
+
 /***/ }),

 /***/ "./node_modules/timers-browserify/main.js":

I tried to use require instead of import on app.js, and solve when the first compiled can not use extracted packages problem. but I don't understand can't use import.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I am still experiencing the issues as described above. Is there any update?

If I use .extract(['vue']) I am running in to issues.

I am having similar issue with vue PWA, where my case as following:

mix.js( 'resources/js/app.js', 'public/js' )
   .js( 'resources/js/firebase-messaging-sw.js', 'public' ) // firebase SW messed up, PWA totally unloadable
   .sass( 'resources/js/assets/scss/app.scss', 'public/css' ) // it will generate empty app.css
   .extract()
   .options( { processCssUrls: mix.inProduction() } );

mix.webpackConfig( config );

For my case if i do remove .extract(), the firebase SW will work, but then the pwa goes blank.

So i do the following work around to make it work:

  • comment out .extract() at webpack.mix.js
  • npm run dev to get the working copy of firebase-messaging-sw.js
  • copy codes from public/firebase-messaging-sw.js
  • remove comment out .extract() at webpack.mix.js
  • npm run dev to generate the working app
  • paste codes copied earlier to public/firebase-messaging-sw.js

By doing so my vue PWA and firebase service worker is working correctly.
In the mean time i can only do the manual work as above...
Anyway to resolve this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kpilard picture kpilard  路  3Comments

amin101 picture amin101  路  3Comments

jpriceonline picture jpriceonline  路  3Comments

jpmurray picture jpmurray  路  3Comments

Micaso picture Micaso  路  3Comments