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) => {});
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) => {});
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))); |
'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', |