Pauan/rollup-plugin-purs

Super Hacky module name: Newline in filename when trying to load the output js

sloosch opened this issue · 1 comments

Having a module defined like:

module Foo
(
bar
)
where
...

the "super hacky"-regex fails and tries to load "Foo\n(/index.js".

Replacing the regex at https://github.com/Pauan/rollup-plugin-purs/blob/master/index.js#L109 with:

var a = /(?:^|\n|\r\n) *module +([^\s]+)/.exec(file);

seems to help.

Pauan commented

Thanks! I just released version 1.0.26 which fixes this.