Skip to content

Commit

Permalink
ESM build (#5618)
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Mar 18, 2024
1 parent ada1066 commit f5a15bd
Show file tree
Hide file tree
Showing 37 changed files with 1,192 additions and 62 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ module.exports = {
'header/header': OFF,
},
},
{
// These aren't compiled, but they're written in module JS
files: ['packages/lexical-playground/esm/*.js'],
parserOptions: {
sourceType: 'module',
},
},
{
files: [
'packages/**/src/__tests__/**',
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module.exports = {
'<rootDir>/packages/lexical-react/src/LexicalTabIndentationPlugin.tsx',
'^@lexical/react/LexicalTablePlugin$':
'<rootDir>/packages/lexical-react/src/LexicalTablePlugin.ts',
'^@lexical/react/src/(.*)$': '<rootDir>/packages/lexical-react/src/$1',
'^@lexical/react/useLexicalCanShowPlaceholder$':
'<rootDir>/packages/lexical-react/src/useLexicalCanShowPlaceholder.ts',
'^@lexical/react/useLexicalDecorators$':
Expand Down
237 changes: 237 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"@rollup/plugin-json": "^5.0.2",
"@rollup/plugin-node-resolve": "^13.0.2",
"@rollup/plugin-replace": "^3.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@size-limit/preset-big-lib": "^8.1.0",
"@types/jest": "^29.4.0",
"@types/jsdom": "^21.1.6",
Expand Down
4 changes: 3 additions & 1 deletion packages/lexical-clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical-clipboard"
}
},
"module": "LexicalClipboard.esm.js",
"sideEffects": false
}
4 changes: 3 additions & 1 deletion packages/lexical-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
},
"devDependencies": {
"@types/prismjs": "^1.26.0"
}
},
"module": "LexicalCode.esm.js",
"sideEffects": false
}
4 changes: 3 additions & 1 deletion packages/lexical-dragon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical-dragon"
}
},
"module": "LexicalDragon.esm.js",
"sideEffects": false
}
4 changes: 3 additions & 1 deletion packages/lexical-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical-file"
}
},
"module": "LexicalFile.esm.js",
"sideEffects": false
}
Loading

0 comments on commit f5a15bd

Please sign in to comment.