mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-26 14:34:27 +02:00
Don't publish .babelrc file
More and more npm packages contain ES2015+ code. As discussed in [this AMA](https://github.com/sindresorhus/ama/issues/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](https://github.com/facebookincubator/create-react-app/issues/1125) and implemented in [this pull request](https://github.com/facebookincubator/create-react-app/pull/3776). This doesn't currently work with Webslides as the .babelrc file is published on npm. Here is a [small repo demonstrating the bug](https://github.com/oligot/webslides-babelrc). Running `npm run build` results in this error ``` ERROR in ./node_modules/webslides/static/js/webslides.js Module build failed: Error: Couldn't find preset "es2015" relative to directory ".../webslides-babelrc/node_modules/webslides" ``` By adding the .babelrc file to .npmignore, and removing the babel config in the _package.json_ file, the bug would go away once a new version of Webslides is published. This is basically the same PR as done for [v-tooltip](https://github.com/Akryum/v-tooltip/pull/90).
This commit is contained in:
1
.npmignore
Normal file
1
.npmignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.babelrc
|
10
package.json
10
package.json
@@ -85,16 +85,6 @@
|
|||||||
"pre-commit": [
|
"pre-commit": [
|
||||||
"lint"
|
"lint"
|
||||||
],
|
],
|
||||||
"babel": {
|
|
||||||
"presets": [
|
|
||||||
[
|
|
||||||
"es2015",
|
|
||||||
{
|
|
||||||
"modules": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"request": "^2.83.0"
|
"request": "^2.83.0"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user