Skip to content

Commit

Permalink
fix: enable to import LazyLoadProps
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroki0525 committed Jan 2, 2023
1 parent ff55b59 commit 2237822
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "4.1.3",
"description": "React Lazy Load Component for your Website Performance🚀",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"module": "dist/index.js",
"exports": {
"development": {
"require": "./dist/cjs/index.development.js",
"default": "./dist/es/index.development.js"
},
"production": {
"require": "./dist/cjs/index.js",
"default": "./dist/es/index.js"
"default": "./dist/index.js"
}
},
"types": "dist/index.d.ts",
Expand All @@ -30,7 +30,7 @@
"postdeploy:examples": "npm run uninstall-local-pkg",
"prebuild": "rm -rf dist",
"build": "rollup -c",
"postbuild": "cp dist/es/index.d.ts dist/index.d.ts && cp dist/es/index.d.ts.map dist/index.d.ts.map && find dist | grep -E '^dist/.+/index\\.d\\.ts(\\.map)?$' | xargs rm -rf",
"postbuild": "find dist | grep -E '^dist/.+/index\\.d\\.ts(\\.map)?$' | xargs rm -rf",
"test": "jest --runInBand",
"posttest": "npm run uninstall-local-pkg",
"lint": "eslint src/",
Expand Down Expand Up @@ -100,7 +100,7 @@
"semantic-release": "19.0.5",
"ts-jest": "29.0.3",
"ts-loader": "9.4.2",
"typescript": "4.8.4"
"typescript": "4.9.4"
},
"peerDependencies": {
"react": ">=18.0.0",
Expand Down Expand Up @@ -132,7 +132,7 @@
"path": "umd/index.js"
},
{
"path": "es/index.js"
"path": "index.js"
}
]
}
Expand Down
7 changes: 5 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const productionConfigs = outputFormats.map(format => ({
input,
output: [
{
file: `dist/${format}/index.js`,
file: format === 'es' ? 'dist/index.js' : `dist/${format}/index.js`,
format,
sourcemap: tsConfigJson.compilerOptions.sourceMap,
name,
Expand All @@ -40,7 +40,10 @@ const developmentConfigs = outputFormats.map(format => ({
input,
output: [
{
file: `dist/${format}/index.development.js`,
file:
format === 'es'
? 'dist/index.development.js'
: `dist/${format}/index.development.js`,
format,
name,
},
Expand Down

0 comments on commit 2237822

Please sign in to comment.