Skip to content

.babelrc should not be published #237

@maxprilutskiy

Description

@maxprilutskiy

Library exposes complied JavaScript (ES5) from lib and es folders. However, there's a .babelrc file in the root of the package, which sometimes interfere with how bundlers work: if bundler sees such a file in the package it tries to run babel with provided config. But it's obvious that I don't have various presets (react/es2015/stage-1) installed initially - and I don't have to, as far as package exposes already compiled code.

Thus, in order for budlers to work correctly there're two solutions:

  1. Move babel-preset-react, babel-preset-es2015, babel-preset-stage-1 from devDependencies to dependencies section, so after npm i has run they got installed and babel would process existing .babelrc correctly (which is noop btw);
  2. Remove .babelrc from published package, because library code is already compiled.

I'm gonna issue a PR for this enhancement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions