diff --git a/build/wp.spa.js b/build/wp.spa.js index c9b9c69..daf07cf 100644 --- a/build/wp.spa.js +++ b/build/wp.spa.js @@ -1,57 +1,57 @@ -const path = require('path') -const webpack = require('webpack') -const merge = require('webpack-merge') -const HtmlWebpackPlugin = require('html-webpack-plugin') -const VueLoaderPlugin = require('vue-loader/lib/plugin') -const MiniCssExtractPlugin = require("mini-css-extract-plugin") - - -const baseConfig = require('./wp.base') -const isDev = process.env.NODE_ENV === 'development' - -module.exports = merge(baseConfig, { - entry: { - app: './client/index.js' - }, - output: { - path: path.resolve(__dirname, '../dist/spa'), - filename: 'js/[name].js', - publicPath: isDev ? 'http://localhost:2333/' : 'https://cdn.clicli.us/spa/' - }, - module: { - rules: [ - { - test: /\.vue$/, - loader: 'vue-loader', - options: { - preserveWhitespace: true - } - }, - ] - }, - optimization: { - splitChunks: { - chunks: 'all' - }, - runtimeChunk: true - }, - plugins: [ - new VueLoaderPlugin(), - new webpack.HotModuleReplacementPlugin(), - new HtmlWebpackPlugin({ - template: './client/index.html' - }), - new MiniCssExtractPlugin({ - filename: "../css/[name].css", - chunkFilename: "css/[id].css" - }) - ], - devServer: { - contentBase: path.join(__dirname, "dist/spa"), - hot: true, - compress: true, - port: 2333, - historyApiFallback: true, - } -}) - +const path = require('path') +const webpack = require('webpack') +const merge = require('webpack-merge') +const HtmlWebpackPlugin = require('html-webpack-plugin') +const VueLoaderPlugin = require('vue-loader/lib/plugin') +const MiniCssExtractPlugin = require("mini-css-extract-plugin") + + +const baseConfig = require('./wp.base') +const isDev = process.env.NODE_ENV === 'development' + +module.exports = merge(baseConfig, { + entry: { + app: './client/index.js' + }, + output: { + path: path.resolve(__dirname, '../dist/spa'), + filename: 'js/[name].js', + publicPath: isDev ? 'http://localhost:2333/' : 'https://cdn.jsdelivr.net/gh/cliclitv/vue-clicli/dist/' + }, + module: { + rules: [ + { + test: /\.vue$/, + loader: 'vue-loader', + options: { + preserveWhitespace: true + } + }, + ] + }, + optimization: { + splitChunks: { + chunks: 'all' + }, + runtimeChunk: true + }, + plugins: [ + new VueLoaderPlugin(), + new webpack.HotModuleReplacementPlugin(), + new HtmlWebpackPlugin({ + template: './client/index.html' + }), + new MiniCssExtractPlugin({ + filename: "../css/[name].css", + chunkFilename: "css/[id].css" + }) + ], + devServer: { + contentBase: path.join(__dirname, "dist/spa"), + hot: true, + compress: true, + port: 2333, + historyApiFallback: true, + } +}) + diff --git a/dist/js/runtime~app.js b/dist/js/runtime~app.js index 667ea68..77c9a1e 100644 --- a/dist/js/runtime~app.js +++ b/dist/js/runtime~app.js @@ -1 +1 @@ -!function(e){function r(r){for(var t,o,c=r[0],i=r[1],d=r[2],a=0,s=[];a0;){var o=t.pop(),i=o.id,d=o.chain;if((c=H[i])&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return{type:"self-declined",chain:d,moduleId:i};if(c.hot._main)return{type:"unaccepted",chain:d,moduleId:i};for(var a=0;a ")),D.type){case"self-declined":r.onDeclined&&r.onDeclined(D),r.ignoreDeclined||(E=new Error("Aborted because of self decline: "+D.moduleId+I));break;case"declined":r.onDeclined&&r.onDeclined(D),r.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+D.moduleId+" in "+D.parentId+I));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(D),r.ignoreUnaccepted||(E=new Error("Aborted because "+d+" is not accepted"+I));break;case"accepted":r.onAccepted&&r.onAccepted(D),j=!0;break;case"disposed":r.onDisposed&&r.onDisposed(D),P=!0;break;default:throw new Error("Unexception type "+D.type)}if(E)return f("abort"),Promise.reject(E);if(j)for(d in w[d]=v[d],p(m,D.outdatedModules),D.outdatedDependencies)Object.prototype.hasOwnProperty.call(D.outdatedDependencies,d)&&(h[d]||(h[d]=[]),p(h[d],D.outdatedDependencies[d]));P&&(p(m,[D.moduleId]),w[d]=g)}var A,M=[];for(t=0;t0;)if(d=T.pop(),c=H[d]){var N={},R=c.hot._disposeHandlers;for(o=0;o=0&&S.parents.splice(A,1))}}for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d]))for(U=h[d],o=0;o=0&&c.children.splice(A,1);for(d in f("apply"),i=y,w)Object.prototype.hasOwnProperty.call(w,d)&&(e[d]=w[d]);var J=null;for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d])){U=h[d];var L=[];for(t=0;t=0&&r._disposeHandlers.splice(n,1)},check:D,apply:P,status:function(e){if(!e)return u;p.push(e)},addStatusHandler:function(e){p.push(e)},removeStatusHandler:function(e){var r=p.indexOf(e);r>=0&&p.splice(r,1)},data:a[e]};return o=void 0,r}(r),parents:(l=s,s=[],l),children:[]};return e[r].call(n.exports,n,n.exports,function(e){var r=H[e];if(!r)return k;var n=function(n){return r.hot.active?(H[n]?-1===H[n].parents.indexOf(e)&&H[n].parents.push(e):(s=[e],o=n),-1===r.children.indexOf(n)&&r.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+e),s=[]),k(n)},t=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(r){k[e]=r}}};for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&"e"!==c&&Object.defineProperty(n,c,t(c));return n.e=function(e){return"ready"===u&&f("prepare"),w++,k.e(e).then(r,function(e){throw r(),e});function r(){w--,"prepare"===u&&(g[e]||E(e),0===w&&0===m&&j())}},n}(r)),n.l=!0,n.exports}k.e=function(e){var r=[],n=x[e];if(0!==n)if(n)r.push(n[2]);else{var t=new Promise(function(r,t){n=x[e]=[r,t]});r.push(n[2]=t);var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.charset="utf-8",c.timeout=120,k.nc&&c.setAttribute("nonce",k.nc),c.src=function(e){return k.p+"js/"+({}[e]||e)+".js"}(e);var i=setTimeout(function(){d({type:"timeout",target:c})},12e4);function d(r){c.onerror=c.onload=null,clearTimeout(i);var n=x[e];if(0!==n){if(n){var t=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src,d=new Error("Loading chunk "+e+" failed.\n("+t+": "+o+")");d.type=t,d.request=o,n[1](d)}x[e]=void 0}}c.onerror=c.onload=d,o.appendChild(c)}return Promise.all(r)},k.m=e,k.c=H,k.d=function(e,r,n){k.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},k.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},k.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(r,"a",r),r},k.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},k.p="https://cdn.clicli.us/",k.oe=function(e){throw console.error(e),e},k.h=function(){return i};var A=window.webpackJsonp=window.webpackJsonp||[],M=A.push.bind(A);A.push=r,A=A.slice();for(var q=0;q0;){var o=t.pop(),i=o.id,d=o.chain;if((c=H[i])&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return{type:"self-declined",chain:d,moduleId:i};if(c.hot._main)return{type:"unaccepted",chain:d,moduleId:i};for(var a=0;a ")),j.type){case"self-declined":r.onDeclined&&r.onDeclined(j),r.ignoreDeclined||(D=new Error("Aborted because of self decline: "+j.moduleId+I));break;case"declined":r.onDeclined&&r.onDeclined(j),r.ignoreDeclined||(D=new Error("Aborted because of declined dependency: "+j.moduleId+" in "+j.parentId+I));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(j),r.ignoreUnaccepted||(D=new Error("Aborted because "+d+" is not accepted"+I));break;case"accepted":r.onAccepted&&r.onAccepted(j),E=!0;break;case"disposed":r.onDisposed&&r.onDisposed(j),P=!0;break;default:throw new Error("Unexception type "+j.type)}if(D)return f("abort"),Promise.reject(D);if(E)for(d in w[d]=v[d],p(m,j.outdatedModules),j.outdatedDependencies)Object.prototype.hasOwnProperty.call(j.outdatedDependencies,d)&&(h[d]||(h[d]=[]),p(h[d],j.outdatedDependencies[d]));P&&(p(m,[j.moduleId]),w[d]=g)}var A,M=[];for(t=0;t0;)if(d=T.pop(),c=H[d]){var N={},R=c.hot._disposeHandlers;for(o=0;o=0&&S.parents.splice(A,1))}}for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d]))for(U=h[d],o=0;o=0&&c.children.splice(A,1);for(d in f("apply"),i=y,w)Object.prototype.hasOwnProperty.call(w,d)&&(e[d]=w[d]);var J=null;for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d])){U=h[d];var L=[];for(t=0;t=0&&r._disposeHandlers.splice(n,1)},check:j,apply:P,status:function(e){if(!e)return u;p.push(e)},addStatusHandler:function(e){p.push(e)},removeStatusHandler:function(e){var r=p.indexOf(e);r>=0&&p.splice(r,1)},data:a[e]};return o=void 0,r}(r),parents:(l=s,s=[],l),children:[]};return e[r].call(n.exports,n,n.exports,function(e){var r=H[e];if(!r)return k;var n=function(n){return r.hot.active?(H[n]?-1===H[n].parents.indexOf(e)&&H[n].parents.push(e):(s=[e],o=n),-1===r.children.indexOf(n)&&r.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+e),s=[]),k(n)},t=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(r){k[e]=r}}};for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&"e"!==c&&Object.defineProperty(n,c,t(c));return n.e=function(e){return"ready"===u&&f("prepare"),w++,k.e(e).then(r,function(e){throw r(),e});function r(){w--,"prepare"===u&&(g[e]||D(e),0===w&&0===m&&E())}},n}(r)),n.l=!0,n.exports}k.e=function(e){var r=[],n=x[e];if(0!==n)if(n)r.push(n[2]);else{var t=new Promise(function(r,t){n=x[e]=[r,t]});r.push(n[2]=t);var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.charset="utf-8",c.timeout=120,k.nc&&c.setAttribute("nonce",k.nc),c.src=function(e){return k.p+"js/"+({}[e]||e)+".js"}(e);var i=setTimeout(function(){d({type:"timeout",target:c})},12e4);function d(r){c.onerror=c.onload=null,clearTimeout(i);var n=x[e];if(0!==n){if(n){var t=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src,d=new Error("Loading chunk "+e+" failed.\n("+t+": "+o+")");d.type=t,d.request=o,n[1](d)}x[e]=void 0}}c.onerror=c.onload=d,o.appendChild(c)}return Promise.all(r)},k.m=e,k.c=H,k.d=function(e,r,n){k.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},k.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},k.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(r,"a",r),r},k.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},k.p="https://cdn.jsdelivr.net/gh/cliclitv/vue-clicli/dist/",k.oe=function(e){throw console.error(e),e},k.h=function(){return i};var A=window.webpackJsonp=window.webpackJsonp||[],M=A.push.bind(A);A.push=r,A=A.slice();for(var q=0;q - + diff --git a/dist/spa/js/runtime~app.js b/dist/spa/js/runtime~app.js index 234adf1..f6f90e1 100644 --- a/dist/spa/js/runtime~app.js +++ b/dist/spa/js/runtime~app.js @@ -1 +1 @@ -!function(e){function r(r){for(var t,o,c=r[0],i=r[1],d=r[2],a=0,s=[];a0;){var o=t.pop(),i=o.id,d=o.chain;if((c=H[i])&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return{type:"self-declined",chain:d,moduleId:i};if(c.hot._main)return{type:"unaccepted",chain:d,moduleId:i};for(var a=0;a ")),D.type){case"self-declined":r.onDeclined&&r.onDeclined(D),r.ignoreDeclined||(E=new Error("Aborted because of self decline: "+D.moduleId+I));break;case"declined":r.onDeclined&&r.onDeclined(D),r.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+D.moduleId+" in "+D.parentId+I));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(D),r.ignoreUnaccepted||(E=new Error("Aborted because "+d+" is not accepted"+I));break;case"accepted":r.onAccepted&&r.onAccepted(D),j=!0;break;case"disposed":r.onDisposed&&r.onDisposed(D),P=!0;break;default:throw new Error("Unexception type "+D.type)}if(E)return f("abort"),Promise.reject(E);if(j)for(d in w[d]=v[d],p(m,D.outdatedModules),D.outdatedDependencies)Object.prototype.hasOwnProperty.call(D.outdatedDependencies,d)&&(h[d]||(h[d]=[]),p(h[d],D.outdatedDependencies[d]));P&&(p(m,[D.moduleId]),w[d]=b)}var A,M=[];for(t=0;t0;)if(d=T.pop(),c=H[d]){var N={},R=c.hot._disposeHandlers;for(o=0;o=0&&S.parents.splice(A,1))}}for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d]))for(U=h[d],o=0;o=0&&c.children.splice(A,1);for(d in f("apply"),i=y,w)Object.prototype.hasOwnProperty.call(w,d)&&(e[d]=w[d]);var J=null;for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(c=H[d])){U=h[d];var L=[];for(t=0;t=0&&r._disposeHandlers.splice(n,1)},check:D,apply:P,status:function(e){if(!e)return u;p.push(e)},addStatusHandler:function(e){p.push(e)},removeStatusHandler:function(e){var r=p.indexOf(e);r>=0&&p.splice(r,1)},data:a[e]};return o=void 0,r}(r),parents:(l=s,s=[],l),children:[]};return e[r].call(n.exports,n,n.exports,function(e){var r=H[e];if(!r)return k;var n=function(n){return r.hot.active?(H[n]?-1===H[n].parents.indexOf(e)&&H[n].parents.push(e):(s=[e],o=n),-1===r.children.indexOf(n)&&r.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+e),s=[]),k(n)},t=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(r){k[e]=r}}};for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&"e"!==c&&Object.defineProperty(n,c,t(c));return n.e=function(e){return"ready"===u&&f("prepare"),w++,k.e(e).then(r,function(e){throw r(),e});function r(){w--,"prepare"===u&&(b[e]||E(e),0===w&&0===m&&j())}},n}(r)),n.l=!0,n.exports}k.e=function(e){var r=[],n=x[e];if(0!==n)if(n)r.push(n[2]);else{var t=new Promise(function(r,t){n=x[e]=[r,t]});r.push(n[2]=t);var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.charset="utf-8",c.timeout=120,k.nc&&c.setAttribute("nonce",k.nc),c.src=function(e){return k.p+"js/"+({}[e]||e)+".js"}(e);var i=setTimeout(function(){d({type:"timeout",target:c})},12e4);function d(r){c.onerror=c.onload=null,clearTimeout(i);var n=x[e];if(0!==n){if(n){var t=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src,d=new Error("Loading chunk "+e+" failed.\n("+t+": "+o+")");d.type=t,d.request=o,n[1](d)}x[e]=void 0}}c.onerror=c.onload=d,o.appendChild(c)}return Promise.all(r)},k.m=e,k.c=H,k.d=function(e,r,n){k.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},k.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},k.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(r,"a",r),r},k.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},k.p="https://cdn.clicli.us/spa/",k.oe=function(e){throw console.error(e),e},k.h=function(){return i};var A=window.webpackJsonp=window.webpackJsonp||[],M=A.push.bind(A);A.push=r,A=A.slice();for(var q=0;q0;){var o=t.pop(),c=o.id,d=o.chain;if((i=H[c])&&!i.hot._selfAccepted){if(i.hot._selfDeclined)return{type:"self-declined",chain:d,moduleId:c};if(i.hot._main)return{type:"unaccepted",chain:d,moduleId:c};for(var a=0;a ")),j.type){case"self-declined":r.onDeclined&&r.onDeclined(j),r.ignoreDeclined||(D=new Error("Aborted because of self decline: "+j.moduleId+I));break;case"declined":r.onDeclined&&r.onDeclined(j),r.ignoreDeclined||(D=new Error("Aborted because of declined dependency: "+j.moduleId+" in "+j.parentId+I));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(j),r.ignoreUnaccepted||(D=new Error("Aborted because "+d+" is not accepted"+I));break;case"accepted":r.onAccepted&&r.onAccepted(j),E=!0;break;case"disposed":r.onDisposed&&r.onDisposed(j),P=!0;break;default:throw new Error("Unexception type "+j.type)}if(D)return f("abort"),Promise.reject(D);if(E)for(d in w[d]=v[d],p(m,j.outdatedModules),j.outdatedDependencies)Object.prototype.hasOwnProperty.call(j.outdatedDependencies,d)&&(h[d]||(h[d]=[]),p(h[d],j.outdatedDependencies[d]));P&&(p(m,[j.moduleId]),w[d]=g)}var A,M=[];for(t=0;t0;)if(d=T.pop(),i=H[d]){var N={},R=i.hot._disposeHandlers;for(o=0;o=0&&S.parents.splice(A,1))}}for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(i=H[d]))for(U=h[d],o=0;o=0&&i.children.splice(A,1);for(d in f("apply"),c=y,w)Object.prototype.hasOwnProperty.call(w,d)&&(e[d]=w[d]);var J=null;for(d in h)if(Object.prototype.hasOwnProperty.call(h,d)&&(i=H[d])){U=h[d];var L=[];for(t=0;t=0&&r._disposeHandlers.splice(n,1)},check:j,apply:P,status:function(e){if(!e)return u;p.push(e)},addStatusHandler:function(e){p.push(e)},removeStatusHandler:function(e){var r=p.indexOf(e);r>=0&&p.splice(r,1)},data:a[e]};return o=void 0,r}(r),parents:(l=s,s=[],l),children:[]};return e[r].call(n.exports,n,n.exports,function(e){var r=H[e];if(!r)return k;var n=function(n){return r.hot.active?(H[n]?-1===H[n].parents.indexOf(e)&&H[n].parents.push(e):(s=[e],o=n),-1===r.children.indexOf(n)&&r.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+e),s=[]),k(n)},t=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(r){k[e]=r}}};for(var i in k)Object.prototype.hasOwnProperty.call(k,i)&&"e"!==i&&Object.defineProperty(n,i,t(i));return n.e=function(e){return"ready"===u&&f("prepare"),w++,k.e(e).then(r,function(e){throw r(),e});function r(){w--,"prepare"===u&&(g[e]||D(e),0===w&&0===m&&E())}},n}(r)),n.l=!0,n.exports}k.e=function(e){var r=[],n=x[e];if(0!==n)if(n)r.push(n[2]);else{var t=new Promise(function(r,t){n=x[e]=[r,t]});r.push(n[2]=t);var o=document.getElementsByTagName("head")[0],i=document.createElement("script");i.charset="utf-8",i.timeout=120,k.nc&&i.setAttribute("nonce",k.nc),i.src=function(e){return k.p+"js/"+({}[e]||e)+".js"}(e);var c=setTimeout(function(){d({type:"timeout",target:i})},12e4);function d(r){i.onerror=i.onload=null,clearTimeout(c);var n=x[e];if(0!==n){if(n){var t=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src,d=new Error("Loading chunk "+e+" failed.\n("+t+": "+o+")");d.type=t,d.request=o,n[1](d)}x[e]=void 0}}i.onerror=i.onload=d,o.appendChild(i)}return Promise.all(r)},k.m=e,k.c=H,k.d=function(e,r,n){k.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},k.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},k.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(r,"a",r),r},k.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},k.p="https://cdn.jsdelivr.net/gh/cliclitv/vue-clicli/dist/",k.oe=function(e){throw console.error(e),e},k.h=function(){return c};var A=window.webpackJsonp=window.webpackJsonp||[],M=A.push.bind(A);A.push=r,A=A.slice();for(var q=0;q