@pirxpilot/html-browserify

Makes HTML files usuable as modules in Browserify

Usage no npm install needed!

<script type="module">
  import pirxpilotHtmlBrowserify from 'https://cdn.skypack.dev/@pirxpilot/html-browserify';
</script>

README

html-browserify

Build Status

Simple HTML transform for Browserify

Install

npm install html-browserify

Usage with Gulp


//...
var html = require('html-browserify');
//...

gulp.task('js', function() {
  gulp.src('js/app.js')
    .pipe(browserify({
      insertGlobals: true,
      transform: html
    }))
    .pipe(concat('app.js'))
    .pipe(gulp.dest('./public/js'));
});