Gin-Quin / fast-toml

The fastest and lightest Javascript parser for TOML 0.5.0 files
MIT License
11 stars 5 forks source link

move the export statement to the bottom #4

Open paulovieira opened 2 years ago

paulovieira commented 2 years ago

Having the export at the export will cause problems when bundling with webpack (in the context of a sapper application). The output produced by rollup will be something like this:

var Scope = Scope$1;

/**
* The class used to manipulate the data
*/
class Scope$1 {
    ...
}

Webpack will then give this error:

var Scope = Scope$1;
                ^
ReferenceError: Cannot access 'Scope$1' before initialization