Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Vue from 'vue'
import Quasar from 'quasar-framework'
import bootstrap from 'bootstrap'
Vue.use(Quasar)
if (__THEME === 'mat') {
require('quasar-extras/roboto-font')
}
import 'quasar-extras/material-icons'
const base = {
el: '#q-app',
render: h => h(require('./root.vue').default)
}
const options = Object.assign({}, base, bootstrap(Vue))
const dev = process.env.DEV
console.warn('~> process.env.DEV', dev)
Vue.config.productionTip = !dev
Vue.config.silent = !dev
Vue.config.devtools = dev
Vue.config.productionTip = dev
Quasar.start(() => {
/* eslint-disable no-new */
new Vue(options)
})
componentWillMount() {
const { fontOpts, colorOpts } = this.props;
// Idempotent bootstrapping by caching initialization state in a global key
if (!window.__REACT_ELEMENTAL_BOOTSTRAPPED__) {
bootstrap(fontOpts, colorOpts);
window.__REACT_ELEMENTAL_BOOTSTRAPPED__ = true;
}
}
ch.error(msg);
res.setHeader("Content-Type", "text/html");
res.end(msg);
} else {
ch.error(
`Rendering fallback failed to render inn server-developmet.js`
);
res.setHeader("Content-Type", "text/html");
res.end(exceptionRenderer(error));
}
}
};
const promises = [];
const cookie = new CookieHelper(req, res);
promises.push(manifoldBootstrap(store.getState, store.dispatch, cookie));
Promise.all(promises).then(render, render);
}
});