Skip to content

Instantly share code, notes, and snippets.

View MilosRasic's full-sized avatar

Miloš Rašić MilosRasic

  • Redbox
  • Belgrade, Serbia
View GitHub Profile
@MilosRasic
MilosRasic / generateAssetPlugin.js
Created August 20, 2018 12:46
GGS GenerateAssetPlugin
new GenerateAssetPlugin({
filename: 'index.html',
fn: (compilation, cb) => {
var appHash = compilation.hash;
if (options.lazyLoadable) {
var oldHashHtmlMatch = indexHtml.match(new RegExp(chunkName + ':"(\\w{' + appHash.length + '})"'));
var newIndexHtml = indexHtml.replace(oldHashHtmlMatch[1], appHash);
@MilosRasic
MilosRasic / appCacheGroups.js
Created August 20, 2018 11:48
GGS app cache group
const vendorChunkName = `${chunkName}.vendor`;
const appCacheGroups = {
//app code
[chunkName]: {
name: chunkName,
test: function(module) {
const include = !module.context || module.context.indexOf('node_modules') === -1;
return include;
@MilosRasic
MilosRasic / app1.js
Created August 20, 2018 11:06
GGS app manifest
import { withLoadable } from 'gogo-sphere-shared-components';
export default {
name: 'App One', // Application name
shortName: 'App 1',
mobileName: 'App1',
path: 'app1', // Path that is being used in a router
redirect: 'app1/landing',
noAppHeader: true, // Should application have header with default breadcrumbs
tabNavigationOverride: false, // Tab navigation instead of sidebar,
module.exports = require('./node_modules/something-something-nda/conf/make-webpack-config')({
devtool: 'eval-source-map',
app: true
});