Add ESM build
parent
78da7f7fb9
commit
ab1ee0613a
|
@ -22,9 +22,11 @@
|
|||
"url": "https://karamoff.dev"
|
||||
},
|
||||
"main": "./dist/shareon.cjs",
|
||||
"module": "./dist/shareon.mjs",
|
||||
"unpkg": "./dist/shareon.min.js",
|
||||
"exports": {
|
||||
"require": "./dist/shareon.cjs"
|
||||
"require": "./dist/shareon.cjs",
|
||||
"import": "./dist/shareon.mjs"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -70,6 +70,11 @@ if (isDev) {
|
|||
format: 'cjs',
|
||||
file: `${outputDir}${pkg.name}.cjs`,
|
||||
});
|
||||
output.push({
|
||||
name: pkg.name,
|
||||
format: 'esm',
|
||||
file: `${outputDir}${pkg.name}.mjs`,
|
||||
});
|
||||
output.push({
|
||||
name: pkg.name,
|
||||
format: 'iife',
|
||||
|
|
Loading…
Reference in New Issue