diff --git a/src/Parser.js b/src/Parser.js index ff0e98387be..132df847e6e 100644 --- a/src/Parser.js +++ b/src/Parser.js @@ -31,6 +31,7 @@ class Parser { this.registerExtension('scss', './assets/SASSAsset'); this.registerExtension('html', './assets/HTMLAsset'); + this.registerExtension('htm', './assets/HTMLAsset'); this.registerExtension('rs', './assets/RustAsset'); let extensions = options.extensions || {}; diff --git a/test/html.js b/test/html.js index 593640f7783..7a0d9ce2277 100644 --- a/test/html.js +++ b/test/html.js @@ -374,4 +374,25 @@ describe('html', function() { ] }); }); + + it('should support bundling HTM', async function() { + let b = await bundle(__dirname + '/integration/htm-extension/index.htm'); + + assertBundleTree(b, { + name: 'index.html', + assets: ['index.htm'], + type: 'html', + childBundles: [ + { + type: 'js', + assets: ['index.js'], + childBundles: [ + { + type: 'map' + } + ] + } + ] + }); + }); }); diff --git a/test/integration/htm-extension/index.htm b/test/integration/htm-extension/index.htm new file mode 100644 index 00000000000..cd26b94e581 --- /dev/null +++ b/test/integration/htm-extension/index.htm @@ -0,0 +1,10 @@ + + +
+