Ensure packages from libraries are processed with babel-loader (#10703)

* Allow webpack to resolve symlinks
* Rename library files to .cjs

GitOrigin-RevId: 0eab18604132104b1c5c92a5e6ed21713006a5a8
This commit is contained in:
Alf Eaton 2023-01-05 10:16:39 +00:00 committed by Copybot
parent afa66aef49
commit aa548b3889
5 changed files with 6 additions and 6 deletions

View file

@ -12,9 +12,9 @@
"cause",
"verror"
],
"main": "index.js",
"main": "index.cjs",
"files": [
"index.js",
"index.cjs",
"index.d.ts"
],
"scripts": {
@ -26,7 +26,7 @@
"prepublishOnly": "npm run --silent declaration:build && npm run --silent declaration:check",
"test": "mocha",
"test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
"typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.js test/**/*.js",
"typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.cjs test/**/*.js",
"update-readme": "doc/update-readme.js",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",

View file

@ -1,9 +1,9 @@
{
"name": "@overleaf/ranges-tracker",
"description": "Shared logic for syncing comments and tracked changes with operational transforms",
"main": "index.js",
"main": "index.cjs",
"files": [
"index.js"
"index.cjs"
],
"author": "Overleaf (https://www.overleaf.com)",
"private": true,

View file

@ -221,7 +221,7 @@ module.exports = {
`frontend/js/vendor/libs/${PackageVersions.lib('fineuploader')}`
),
},
symlinks: false,
// symlinks: false, // enable this while using `npm link`
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
fallback: {
events: require.resolve('events'),