Skip to content
This repository was archived by the owner on Mar 14, 2022. It is now read-only.

Commit 78848f8

Browse files
committed
Merge branch 'release/3.1.0'
2 parents 1501b70 + a8b43fd commit 78848f8

28 files changed

+4328
-7912
lines changed

.config/base.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import nodeResolve from 'rollup-plugin-node-resolve';
22
import babel from 'rollup-plugin-babel';
33
import typescript from 'rollup-plugin-typescript2';
44
import json from 'rollup-plugin-json';
5+
import commonjs from 'rollup-plugin-commonjs';
56

67
export const plugins = {
78
typescript: typescript(),
89
babel: babel({
910
babelrc: false,
10-
exclude: ['node_modules/**', '**.json'],
11+
exclude: ['/node_modules/', '**.json'],
1112
extensions: ['.js', '.ts', '.tsx', '.jsx'],
1213
presets: [
1314
'@babel/env'
@@ -17,6 +18,12 @@ export const plugins = {
1718
json: json({
1819
include: 'package.json',
1920
compact: true
21+
}),
22+
commonjs: commonjs({
23+
include: [
24+
'node_modules/**',
25+
'src/lib/**'
26+
]
2027
})
2128
};
2229

@@ -25,6 +32,7 @@ export const baseConfig = {
2532
plugins: [
2633
plugins.json,
2734
plugins.replace,
35+
plugins.commonjs,
2836
plugins.typescript,
2937
plugins.babel,
3038
plugins.nodeResolve,

.config/commonjs.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { baseConfig } from './base';
2-
import commonjs from 'rollup-plugin-commonjs';
1+
import typescript from 'rollup-plugin-typescript2';
2+
import { baseConfig, plugins } from './base';
33

44
const env = process.env.NODE_ENV;
55
const filename = 'react-handsontable.js';
@@ -8,7 +8,8 @@ export const cjsConfig = {
88
output: {
99
format: env,
1010
indent: false,
11-
file: `./commonjs/${filename}`
11+
file: `./commonjs/${filename}`,
12+
exports: 'named'
1213
},
13-
plugins: baseConfig.plugins.concat([commonjs()])
14+
plugins: baseConfig.plugins,
1415
};

.config/es.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import typescript from 'rollup-plugin-typescript2';
2+
import { baseConfig } from './base';
23
import { plugins } from './base';
34

45
const env = process.env.NODE_ENV;
@@ -13,15 +14,16 @@ export const esConfig = {
1314
plugins: [
1415
plugins.json,
1516
plugins.replace,
17+
plugins.commonjs,
1618
typescript({
1719
tsconfigOverride: {
1820
compilerOptions: {
1921
declaration: true
2022
}
2123
},
22-
useTsconfigDeclarationDir: true
24+
useTsconfigDeclarationDir: true,
2325
}),
2426
plugins.babel,
2527
plugins.nodeResolve,
26-
],
28+
]
2729
};

.config/minified.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const minConfig = {
1010
name: 'Handsontable.react',
1111
indent: false,
1212
sourcemap: true,
13-
file: `./dist/${minFilename}`
13+
exports: 'named',
14+
file: `./dist/${minFilename}`,
15+
globals: {
16+
react: 'React',
17+
'react-dom': 'ReactDOM',
18+
handsontable: 'Handsontable'
19+
}
1420
},
1521
plugins: baseConfig.plugins.concat([
1622
uglify({
@@ -21,7 +27,6 @@ const minConfig = {
2127
pure_getters: true,
2228
unsafe: true,
2329
unsafe_comps: true,
24-
warnings: false
2530
}
2631
})
2732
])

.config/umd.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { addLicenseBanner } from './helpers/licenseBanner';
2+
import { baseConfig } from './base';
23

34
const env = process.env.NODE_ENV;
45
const filename = 'react-handsontable.js';
@@ -9,8 +10,15 @@ const umdConfig = {
910
name: 'Handsontable.react',
1011
indent: false,
1112
sourcemap: true,
12-
file: `./dist/${filename}`
13-
}
13+
exports: 'named',
14+
file: `./dist/${filename}`,
15+
globals: {
16+
react: 'React',
17+
'react-dom': 'ReactDOM',
18+
handsontable: 'Handsontable'
19+
}
20+
},
21+
plugins: baseConfig.plugins
1422
};
1523

1624
addLicenseBanner(umdConfig);

0 commit comments

Comments
 (0)