Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NPM package isn't published in es5 #10

@chrisgervang

Description

@chrisgervang

While trying to use Martini in a deck.gl terrain layer, I discovered the NPM package isn't transpiled to es5 (pure JS developers would run into syntax issues).

Could you publish an es5 version as the default along side es6 distributable?

Screen Shot 2020-02-03 at 6 45 55 PM

You might find this article useful, it seems most folks are using babel (and this plugin) to do the transpiling.
Here's a snippet of their rollup config.

babel({
    // ignore node_modules/ in transpilation process
    exclude: 'node_modules/**',
    // ignore .babelrc (if defined) and use options defined here
    babelrc: false,
    // use recommended babel-preset-env without es modules enabled
    // and with possibility to set custom targets e.g. { node: '8' }
    presets: [['env', { modules: false, targets }]],
    // solve a problem with spread operator transpilation https://github.com/rollup/rollup/issues/281
    plugins: ['babel-plugin-transform-object-rest-spread'],
    // removes comments from output
    comments: false,
  }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions