Skip to content

Commit 1911865

Browse files
layershifterlevithomason
authored andcommitted
chore(package): support for jsnext:main (#1210)
* chore(package): support for jsnext:main * chore(package): lodash plugin goes back
1 parent 8c619da commit 1911865

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
"es2015",
3+
"./build/preset-es2015",
44
"react",
55
"stage-1"
66
],

build/preset-es2015.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const options = process.env.BABEL_ENV === 'es' ? { modules: false } : {}
2+
3+
module.exports = {
4+
presets: [
5+
['es2015', options],
6+
],
7+
}

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
"name": "semantic-ui-react",
33
"version": "0.64.3",
44
"description": "The official Semantic-UI-React integration.",
5+
"jsnext:main": "dist/es/index.js",
56
"main": "dist/commonjs/index.js",
7+
"module": "dist/es/index.js",
68
"files": [
79
"src",
810
"dist",
911
"index.d.ts"
1012
],
1113
"scripts": {
1214
"docs": "gulp docs",
13-
"build": "npm run build:commonjs && npm run build:umd && npm run build:docs",
15+
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:docs",
1416
"prebuild:commonjs": "rimraf dist/commonjs",
1517
"build:commonjs": "babel src -d dist/commonjs && npm run tsd",
18+
"prebuild:es": "rimraf dist/es",
19+
"build:es": "cross-env BABEL_ENV=es babel src -d dist/es",
1620
"prebuild:docs": "npm run build:docs-toc",
1721
"build:dll": "gulp dll",
1822
"build:docs": "gulp build:docs",

0 commit comments

Comments
 (0)