Skip to content

Commit 9c8ab4d

Browse files
oligotGuillaume Chau
authored and
Guillaume Chau
committed
Don't publish .babelrc file (#90)
More and more npm packages contain ES2015+ code. As discussed in [this AMA](sindresorhus/ama#446), this causes a lot of troubles (Uglify and old browsers) for people. One possible solution is to transpile external dependencies, as discussed in [this issue on create-react-app](facebook/create-react-app#1125) and implemented in [this pull request](facebook/create-react-app#3776) This doesn't currently work with v-tooltip as the .babelrc file is published on npm. Here is a [small repo demonstrating the bug](https://github.com/oligot/v-tooltip-babelrc). Running `npm run build` results in this error ``` ERROR in ./node_modules/v-tooltip/dist/v-tooltip.esm.js Module build failed: Error: Couldn't find preset "stage-0" relative to directory ".../v-tooltip-babelrc/node_modules/v-tooltip" ``` By adding the .babelrc file to .npmignore, the bug would go away once a new version of v-tooltip is published.
1 parent 9fc49cd commit 9c8ab4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
src/
22
docs/
33
demo-src/
4+
.babelrc

0 commit comments

Comments
 (0)