Skip to content

Instantly share code, notes, and snippets.

Avatar

Javier Centurion jcenturion

View GitHub Profile
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 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 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.