Skip to content

Commit 0657019

Browse files
committed
Continue to build commonjs until immutable v6
1 parent 5ba975a commit 0657019

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

packages/devtools/demo/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Immutable from 'immutable';
2-
import installDevTools from '../dist/index.js';
2+
import installDevTools from '../dist/index.mjs';
33

44
var MyRecord = Immutable.Record(
55
{

packages/devtools/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
"description": "Chrome Dev Tools formatter for the Immutable JS library",
66
"exports": {
77
".": {
8-
"import": "./dist/index.js",
8+
"import": "./dist/index.mjs",
9+
"require": "./dist/index.cjs",
910
"types": "./dist/index.d.ts"
1011
}
1112
},
13+
"main": "dist/index.cjs",
14+
"types": "dist/index.d.ts",
1215
"files": [
1316
"dist"
1417
],
1518
"scripts": {
1619
"build:types": "tsc",
17-
"build:module": "rollup -c",
20+
"build:module": "rm -rf dist; rollup -c",
1821
"build": "yarn run build:types && yarn run build:module",
1922
"lint:types": "tsc --noEmit",
2023
"lint": "yarn run lint:types",

packages/devtools/rollup.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ function injectDemoSource() {
2929
const config = [
3030
{
3131
input: 'src/index.ts',
32-
output: {
33-
dir: 'dist',
34-
format: 'es',
35-
},
32+
output: [
33+
{
34+
file: 'dist/index.mjs',
35+
format: 'es',
36+
},
37+
{
38+
file: 'dist/index.cjs',
39+
format: 'cjs',
40+
},
41+
],
3642
plugins: [
3743
babel({
3844
babelHelpers: 'bundled',

packages/devtools/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Immutable4 from 'immutable';
44
import Immutable3 from 'immutable3';
55

6-
import installDevTools from './dist/index.js';
6+
import installDevTools from './dist/index.mjs';
77
installDevTools(Immutable4);
88

99
console.log('Testing with Immutable 4');

0 commit comments

Comments
 (0)