Skip to content

Instantly share code, notes, and snippets.

Javier Centurion jcenturion

Block or report user

Report or block jcenturion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wt-yaml-compiler.js
const yaml = require('js-yaml');
module.exports = (options, cb) => {
return cb(null, (ctx, req, res) => {
if (req.method !== 'GET') {
res.writeHead(405);
return res.end();
}
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(yaml.load(options.script)));
View sample.js
'use latest'
import express from 'express';
import { fromExpress } from 'webtask-tools';
import bodyParser from 'body-parser';
const app = express();
app.get('/', (req, res) => {
const HTML = renderView({
title: 'Sample extension',
View turn-off-webpack-code-splitting.md

How to turn off Webpack code-splitting

Using Webpack import()

The following code will produce code-splitting in Webpack, which means that the source code will be split into several files that will be loaded async at runtime.. More info here;

import('./some-module').then((SomeModule) => {});
You can’t perform that action at this time.