File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,5 +25,6 @@ yarn-error.log*
2525
2626/editor-content.js
2727/index.js
28+ /index.cjs.js
2829/formik.js
29- storybook-static
30+ storybook-static
Original file line number Diff line number Diff line change 11{
22 "name" : " @bigbinary/neeto-editor" ,
33 "version" : " 1.23.1" ,
4- "main" : " ./index.js" ,
4+ "main" : " ./index.cjs. js" ,
55 "module" : " ./index.js" ,
66 "types" : " ./types.d.ts" ,
77 "description" : " neetoEditor is the library that drives the rich text experience in all neeto products built at BigBinary" ,
1212 " react"
1313 ],
1414 "files" : [
15- " index.js " ,
15+ " index.* " ,
1616 " types.d.ts"
1717 ],
1818 "author" : " BigBinary" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ const projectResolve = require("./resolve.js");
1818const { alias : aliasEntries } = mergeDeepLeft ( projectResolve , commonResolve ) ;
1919const peerDependencies = Object . keys ( packageJson . peerDependencies ) ;
2020
21+ const formats = [ "esm" , "cjs" ] ;
22+
2123const plugins = [
2224 peerDepsExternal ( ) ,
2325 alias ( { entries : aliasEntries } ) ,
@@ -47,13 +49,13 @@ export default [
4749 {
4850 input : "./src/index.js" ,
4951 external : peerDependencies ,
50- output : {
51- file : " ./index.js",
52- format : "esm" ,
52+ output : formats . map ( ( format ) => ( {
53+ file : format === "esm" ? " ./index.js" : "./index.cjs .js",
54+ format,
5355 sourcemap : false ,
5456 name : "neetoEditor" ,
5557 assetFileNames : "[name][extname]" ,
56- } ,
58+ } ) ) ,
5759 plugins,
5860 } ,
5961 {
You can’t perform that action at this time.
0 commit comments