mirror of
https://github.com/gosticks/react-table.git
synced 2026-12-03 11:11:39 +00:00
Add support for es module build (#1374)
This commit is contained in:
committed by
Tanner Linsley
parent
5369051b05
commit
e4429b7143
+2
-2
@@ -15,8 +15,8 @@
|
||||
"datagrid"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"_module": "dist/index.es.js",
|
||||
"_jsnext:main": "dist/index.es.js",
|
||||
"module": "dist/index.es.js",
|
||||
"jsnext:main": "dist/index.es.js",
|
||||
"scripts": {
|
||||
"test": "cross-env CI=1 react-scripts test --env=jsdom",
|
||||
"test:watch": "react-scripts test --env=jsdom",
|
||||
|
||||
+30
-21
@@ -6,27 +6,36 @@ import { uglify } from 'rollup-plugin-uglify'
|
||||
|
||||
import pkg from './package.json'
|
||||
|
||||
export default {
|
||||
input: 'src/index.js',
|
||||
output: [
|
||||
{
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.js',
|
||||
output: {
|
||||
file: pkg.main,
|
||||
format: 'cjs',
|
||||
sourcemap: true
|
||||
}
|
||||
// {
|
||||
// file: pkg.module,
|
||||
// format: "es",
|
||||
// sourcemap: true
|
||||
// }
|
||||
],
|
||||
plugins: [
|
||||
external(),
|
||||
babel({
|
||||
exclude: 'node_modules/**'
|
||||
}),
|
||||
resolve(),
|
||||
commonjs(),
|
||||
uglify()
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
external(),
|
||||
babel({
|
||||
exclude: 'node_modules/**'
|
||||
}),
|
||||
resolve(),
|
||||
commonjs(),
|
||||
uglify()
|
||||
]
|
||||
},
|
||||
{
|
||||
input: 'src/index.js',
|
||||
external: Object.keys(pkg.peerDependencies),
|
||||
output: {
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
babel({
|
||||
exclude: ['/**/node_modules/**']
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user