mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-01-16 20:28:28 +01:00
mjs extension to esm modules
This commit is contained in:
parent
2044b568a7
commit
dfac859764
@ -22,8 +22,10 @@ See the LICENSE file in the root directory of this source tree.`
|
||||
|
||||
export const getRollupConfig = (pkg, outputFileName, bundles, globals) => {
|
||||
return bundles
|
||||
.map(({ inputs, format, minify, preserveModules, outputDir = 'dist', extension = 'js' }) =>
|
||||
inputs.map(input => ({
|
||||
.map(({ inputs, format, minify, preserveModules, outputDir = 'dist', extension = 'js' }) => {
|
||||
console.log(format, extension)
|
||||
|
||||
return inputs.map(input => ({
|
||||
input,
|
||||
plugins: getRollupPlugins(pkg, minify),
|
||||
external: Object.keys(globals),
|
||||
@ -32,6 +34,7 @@ export const getRollupConfig = (pkg, outputFileName, bundles, globals) => {
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
entryFileNames: `[name].${extension}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.${extension}`,
|
||||
@ -41,7 +44,7 @@ export const getRollupConfig = (pkg, outputFileName, bundles, globals) => {
|
||||
preserveModules,
|
||||
globals,
|
||||
},
|
||||
})),
|
||||
)
|
||||
}))
|
||||
})
|
||||
.flat();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
"amdName": "tabler-icons-preact",
|
||||
"main": "dist/cjs/tabler-icons-preact.js",
|
||||
"main:umd": "dist/umd/tabler-icons-preact.js",
|
||||
"module": "dist/esm/tabler-icons-preact.js",
|
||||
"module": "dist/esm/tabler-icons-preact.mjs",
|
||||
"unpkg": "dist/umd/tabler-icons-preact.min.js",
|
||||
"typings": "dist/tabler-icons-preact.d.ts",
|
||||
"files": [
|
||||
|
@ -21,7 +21,7 @@
|
||||
"amdName": "tabler-icons-react-native",
|
||||
"main": "dist/cjs/tabler-icons-react-native.js",
|
||||
"main:umd": "dist/umd/tabler-icons-react-native.js",
|
||||
"module": "dist/esm/tabler-icons-react-native.js",
|
||||
"module": "dist/esm/tabler-icons-react-native.mjs",
|
||||
"unpkg": "dist/umd/tabler-icons-react-native.min.js",
|
||||
"typings": "dist/tabler-icons-react-native.d.ts",
|
||||
"react-native": "dist/esm/tabler-icons-react-native.js",
|
||||
|
@ -20,7 +20,7 @@
|
||||
"type": "module",
|
||||
"main": "dist/cjs/tabler-icons-react.js",
|
||||
"main:umd": "dist/umd/tabler-icons-react.js",
|
||||
"module": "dist/esm/tabler-icons-react.js",
|
||||
"module": "dist/esm/tabler-icons-react.mjs",
|
||||
"unpkg": "dist/umd/tabler-icons-react.min.js",
|
||||
"typings": "dist/tabler-icons-react.d.ts",
|
||||
"sideEffects": false,
|
||||
|
@ -19,7 +19,7 @@
|
||||
},
|
||||
"source": "src/tabler-icons-solidjs.ts",
|
||||
"main": "dist/cjs/tabler-icons-solidjs.js",
|
||||
"module": "dist/esm/tabler-icons-solidjs.js",
|
||||
"module": "dist/esm/tabler-icons-solidjs.mjs",
|
||||
"types": "dist/types/tabler-icons-solidjs.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
|
@ -20,7 +20,7 @@
|
||||
"amdName": "tabler-icons-vue",
|
||||
"main": "dist/cjs/tabler-icons-vue.js",
|
||||
"main:umd": "dist/umd/tabler-icons-vue.js",
|
||||
"module": "dist/esm/tabler-icons-vue.js",
|
||||
"module": "dist/esm/tabler-icons-vue.mjs",
|
||||
"unpkg": "dist/umd/tabler-icons-vue.min.js",
|
||||
"typings": "dist/tabler-icons-vue.d.ts",
|
||||
"sideEffects": false,
|
||||
|
@ -8,16 +8,11 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tabler/tabler-icons.git"
|
||||
},
|
||||
"main": "dist/cjs/tabler-icons.js",
|
||||
"main:umd": "dist/umd/tabler-icons.js",
|
||||
"exports": {
|
||||
"./*": [
|
||||
"./icons/*"
|
||||
]
|
||||
},
|
||||
"module": "dist/esm/tabler-icons.js",
|
||||
"unpkg": "dist/umd/tabler-icons.min.js",
|
||||
"typings": "dist/tabler-icons.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"icons.json",
|
||||
|
Loading…
x
Reference in New Issue
Block a user