Closed shibukawa closed 8 years ago
When I compile template the code that uses Browserify to combine source files, it doesn't convert correctly. The following output file was generated from almost same source code of #611. The source has extra line "var m = require('mithril');".
var m$750 = require('mithril'); : function view$754() { return m$750('div', [ m$750('input', { onchange: m$750.withAttr('value', vm$752.description), value: vm$752.description() }), m$750('button', { onclick: vm$752.add }, 'Add'), m$750('table', vm$752.list().map(function (task$756) { return m$750('tr', [ m$750('td', [m$750('input[type=checkbox]', { onclick: m$750.withAttr('checked', task$756.done), value: task$756.done() })]), m$750('td', { style: { textDecoration: task$756.done() ? 'line-through' : 'none' } }, task$756.description()) ]); })) ]); }
I'm now recommending people to use mithril-objectify instead of the sweet.js macros
When I compile template the code that uses Browserify to combine source files, it doesn't convert correctly. The following output file was generated from almost same source code of #611. The source has extra line "var m = require('mithril');".