From 39e2a2e529c99a3e002c873237354dcecb035b33 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Mon, 28 Mar 2016 19:04:56 -0600 Subject: [PATCH 1/2] transform all files, not just those with names ending .js --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 80f230f..7580d86 100644 --- a/src/index.js +++ b/src/index.js @@ -90,8 +90,7 @@ export default function inject ( options ) { transform ( code, id ) { if ( !filter( id ) ) return null; if ( code.search( firstpass ) == -1 ) return null; - if ( extname( id ) !== '.js' ) return null; - + let ast; try { From 91fcd76fbfd7febe2137363133c717349301eed6 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Mon, 28 Mar 2016 19:28:56 -0600 Subject: [PATCH 2/2] remove extname import --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 7580d86..6abd04a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import { attachScopes, createFilter } from 'rollup-pluginutils'; -import { extname, sep } from 'path'; +import { sep } from 'path'; import { walk } from 'estree-walker'; import { parse } from 'acorn'; import makeLegalIdentifier from './makeLegalIdentifier'; @@ -90,7 +90,7 @@ export default function inject ( options ) { transform ( code, id ) { if ( !filter( id ) ) return null; if ( code.search( firstpass ) == -1 ) return null; - + let ast; try {