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'},
|
||||
)
|
||||
|
||||
// build({
|
||||
// ...esbuildConfig,
|
||||
// outfile: path.join(pathToPackage, 'dist/index.mjs'),
|
||||
// format: 'esm',
|
||||
// })
|
||||
build({
|
||||
...esbuildConfig,
|
||||
outfile: path.join(pathToPackage, 'dist/index.mjs'),
|
||||
format: 'esm',
|
||||
})
|
||||
}
|
||||
|
||||
createBundles(false)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
"directory": "packages/r3f"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
|
|
Loading…
Reference in a new issue