Skip to content

Commit

Permalink
fix: type module causing issues with require (#3159)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 authored Feb 20, 2023
1 parent aa0c64e commit 63334ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 4 additions & 0 deletions packages/web/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports =
process.env.NODE_ENV === 'production'
? require('./dist/tolgee-web.production.cjs.js')
: require('./dist/tolgee-web.development.cjs.js');
14 changes: 4 additions & 10 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "5.3.0",
"description": "Tolgee for web",
"declaration": true,
"main": "./dist/tolgee-web.universal.cjs.js",
"module": "./dist/tolgee-web.universal.esm.js",
"main": "./index.js",
"types": "./types/index.d.ts",
"type": "module",
"exports": {
Expand All @@ -14,14 +13,9 @@
"import": "./dist/tolgee-web.production.esm.js",
"svelte": "./dist/tolgee-web.production.esm.js"
},
"development": {
"require": "./dist/tolgee-web.development.cjs.js",
"import": "./dist/tolgee-web.development.esm.js",
"svelte": "./dist/tolgee-web.development.esm.js"
},
"require": "./dist/tolgee-web.universal.cjs.js",
"import": "./dist/tolgee-web.universal.esm.js",
"svelte": "./dist/tolgee-web.universal.esm.js",
"require": "./index.js",
"import": "./dist/tolgee-web.development.esm.js",
"svelte": "./dist/tolgee-web.development.esm.js",
"types": "./types/index.d.ts"
},
"./tools": {
Expand Down
4 changes: 0 additions & 4 deletions packages/web/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ export default [
input: 'src/entry-production.ts',
name: 'web.production',
}),
buildPackage({
input: 'src/entry-universal.ts',
name: 'web.universal',
}),

// in-context tools
buildPackage({
Expand Down

0 comments on commit 63334ce

Please sign in to comment.