fix(package) add esm node version + move web to separate export
This commit is contained in:
parent
a6df96fd90
commit
9b86c7186a
13
package.json
13
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sati",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "next generation anti-captcha",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@ -37,9 +37,14 @@
|
||||
"types": "./dist/src/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "dist/sati.web.esm.mjs",
|
||||
"require": "dist/sati.web.umd.js",
|
||||
"types": "dist/src/index.d.ts"
|
||||
"import": "./dist/sati.node.esm.js",
|
||||
"require": "./dist/sati.node.cjs.js",
|
||||
"types": "./dist/src/index.d.ts"
|
||||
},
|
||||
"web": {
|
||||
"import": "./dist/sati.web.esm.js",
|
||||
"require": "./dist/sati.web.umd.js",
|
||||
"types": "./dist/src/index.d.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,20 @@ module.exports = [{
|
||||
optimization: {
|
||||
minimize: false
|
||||
}
|
||||
}, {
|
||||
// prebuilt node esm version
|
||||
...build('node'),
|
||||
output: {
|
||||
library: {
|
||||
type: 'module'
|
||||
},
|
||||
filename: 'sati.node.esm.mjs'
|
||||
},
|
||||
externals: /^[^\.%]/,
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
experiments: {
|
||||
outputModule: true
|
||||
}
|
||||
}]
|
Loading…
x
Reference in New Issue
Block a user