diff --git a/libraries/o-error/index.js b/libraries/o-error/index.cjs similarity index 100% rename from libraries/o-error/index.js rename to libraries/o-error/index.cjs diff --git a/libraries/o-error/package.json b/libraries/o-error/package.json index 306ee07cda..a5283d4a82 100644 --- a/libraries/o-error/package.json +++ b/libraries/o-error/package.json @@ -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'", diff --git a/libraries/ranges-tracker/index.js b/libraries/ranges-tracker/index.cjs similarity index 100% rename from libraries/ranges-tracker/index.js rename to libraries/ranges-tracker/index.cjs diff --git a/libraries/ranges-tracker/package.json b/libraries/ranges-tracker/package.json index 8c54e046eb..13a2428f85 100644 --- a/libraries/ranges-tracker/package.json +++ b/libraries/ranges-tracker/package.json @@ -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, diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index 04b2532e85..726dccad6a 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -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'),