Add ESM build to the R3F package and update package.json
This commit is contained in:
parent
0171fb88af
commit
2204e771b3
2 changed files with 6 additions and 5 deletions
|
@ -67,11 +67,11 @@ function createBundles(watch: boolean) {
|
||||||
{encoding: 'utf-8'},
|
{encoding: 'utf-8'},
|
||||||
)
|
)
|
||||||
|
|
||||||
// build({
|
build({
|
||||||
// ...esbuildConfig,
|
...esbuildConfig,
|
||||||
// outfile: path.join(pathToPackage, 'dist/index.mjs'),
|
outfile: path.join(pathToPackage, 'dist/index.mjs'),
|
||||||
// format: 'esm',
|
format: 'esm',
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
createBundles(false)
|
createBundles(false)
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"directory": "packages/r3f"
|
"directory": "packages/r3f"
|
||||||
},
|
},
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"module": "dist/index.mjs",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"files": [
|
"files": [
|
||||||
|
|
Loading…
Reference in a new issue