File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 11import * as Immutable from 'immutable' ;
2- import installDevTools from '../dist/index.js ' ;
2+ import installDevTools from '../dist/index.mjs ' ;
33
44var MyRecord = Immutable . Record (
55 {
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -29,10 +29,16 @@ function injectDemoSource() {
2929const 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' ,
Original file line number Diff line number Diff line change 33import Immutable4 from 'immutable' ;
44import Immutable3 from 'immutable3' ;
55
6- import installDevTools from './dist/index.js ' ;
6+ import installDevTools from './dist/index.mjs ' ;
77installDevTools ( Immutable4 ) ;
88
99console . log ( 'Testing with Immutable 4' ) ;
You can’t perform that action at this time.
0 commit comments