Skip to content

Commit f039ee7

Browse files
jarkonikmrdoob
authored andcommitted
Add empty map to glsl plugin (mrdoob#9745)
That is how it should look like according to rollup plugin conventions: https://github.com/rollup/rollup/wiki/Plugins
1 parent 43f8b76 commit f039ee7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rollup.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ function glsl () {
1212
transform ( code, id ) {
1313
if ( !/\.glsl$/.test( id ) ) return;
1414

15-
return 'export default ' + JSON.stringify(
15+
var transformedCode = 'export default ' + JSON.stringify(
1616
code
1717
.replace( /[ \t]*\/\/.*\n/g, '' )
1818
.replace( /[ \t]*\/\*[\s\S]*?\*\//g, '' )
1919
.replace( /\n{2,}/g, '\n' )
2020
) + ';';
21+
return {
22+
code: transformedCode,
23+
map: { mappings: '' }
24+
}
2125
}
2226
};
2327
}

0 commit comments

Comments
 (0)