File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "presets" : [
3
- " @babel/env"
4
- ]
2
+ "presets" : [" @babel/env" ],
3
+ "env" : {
4
+ "production-esm" : {
5
+ "presets" : [
6
+ [" @babel/env" , { "modules" : false }]
7
+ ]
8
+ }
9
+ }
5
10
}
Original file line number Diff line number Diff line change 2
2
"name" : " detect-element-overflow" ,
3
3
"version" : " 1.1.1" ,
4
4
"description" : " A function that tells you whether a given element is overflowing its container or not. Useful for creating dropdowns and tooltips." ,
5
- "main" : " dist/index.js" ,
6
- "es6" : " src/index.js" ,
5
+ "main" : " dist/umd/index.js" ,
6
+ "module" : " dist/esm/index.js" ,
7
+ "source" : " src/index.js" ,
8
+ "sideEffects" : false ,
7
9
"scripts" : {
8
- "build" : " babel src -d dist --ignore **/*.spec.js" ,
10
+ "build" : " yarn build-esm && yarn build-umd" ,
11
+ "build-esm" : " BABEL_ENV=production-esm babel src -d dist/esm --ignore **/*.spec.js" ,
12
+ "build-umd" : " BABEL_ENV=production-umd babel src -d dist/umd --ignore **/*.spec.js" ,
9
13
"clean" : " rimraf dist" ,
10
14
"lint" : " eslint src/ --ext .jsx,.js" ,
11
15
"prepublishOnly" : " yarn clean && yarn build" ,
You can’t perform that action at this time.
0 commit comments