Browse Source

Fix budo config (with a workaround for now) (#705)

Danilo Bargen 6 years ago
parent
commit
6045cb7cdc
1 changed files with 11 additions and 4 deletions
  1. 11 4
      dist/devserver.js

+ 11 - 4
dist/devserver.js

@@ -7,14 +7,21 @@
 const budo = require('budo')
 const babelify = require('babelify')
 const babelifyConfig = require('./babelify-config.js');
+const tsify = require('tsify');
 
-budo(null, {
+budo('src/app.ts:dist/app.js', {
     dir: ['public', '.', 'src'],
     live: true,
     stream: process.stdout,
     port: 9966,
     debug: true,
-    browserify: {
-        transform: [babelify, babelifyConfig]
-    },
+    //browserify: {  // TODO: See #705
+    //    plugin: tsify,
+    //    transform: [babelify.configure(babelifyConfig)],
+    //},
+    browserifyArgs: ['-d', '-p', 'tsify', '-t', '[', 'babelify', '--presets', '[', '@babel/env', ']', '--extensions', '.ts', ']'],
+}).on('connect', (ev) => {
+    console.log('Server running on %s', ev.uri);
+}).on('update', (buffer) => {
+    console.log('Bundle update, %d bytes', buffer.length);
 });