rollup plugins fix
This commit is contained in:
parent
a06ad58685
commit
0a955dcc11
|
|
@ -4,11 +4,6 @@ import { PACKAGES_DIR, readSvgs, readAliases, toPascalCase } from './helpers.mjs
|
|||
import { stringify } from 'svgson'
|
||||
import prettier from "@prettier/sync"
|
||||
|
||||
import bundleSize from '@atomico/rollup-plugin-sizes'
|
||||
import { visualizer } from 'rollup-plugin-visualizer'
|
||||
import license from 'rollup-plugin-license'
|
||||
import esbuild from 'rollup-plugin-esbuild'
|
||||
|
||||
/**
|
||||
* Build icons
|
||||
*
|
||||
|
|
@ -121,18 +116,3 @@ export const buildIcons = ({
|
|||
}
|
||||
}
|
||||
|
||||
export const getRollupPlugins = (pkg, minify) => {
|
||||
return [
|
||||
esbuild({
|
||||
minify
|
||||
}),
|
||||
license({
|
||||
banner: `${pkg.name} v${pkg.version} - ${pkg.license}`
|
||||
}),
|
||||
bundleSize(),
|
||||
visualizer({
|
||||
sourcemap: false,
|
||||
filename: `stats/${pkg.name}${minify ? '-min' : ''}.html`
|
||||
})
|
||||
].filter(Boolean)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
import bundleSize from '@atomico/rollup-plugin-sizes'
|
||||
import { visualizer } from 'rollup-plugin-visualizer'
|
||||
import license from 'rollup-plugin-license'
|
||||
import esbuild from 'rollup-plugin-esbuild'
|
||||
|
||||
export const getRollupPlugins = (pkg, minify) => {
|
||||
return [
|
||||
esbuild({
|
||||
minify
|
||||
}),
|
||||
license({
|
||||
banner: `@license ${pkg.name} v${pkg.version} - ${pkg.license}
|
||||
|
||||
This source code is licensed under the ${pkg.license} license.
|
||||
See the LICENSE file in the root directory of this source tree.`
|
||||
}),
|
||||
bundleSize(),
|
||||
visualizer({
|
||||
sourcemap: false,
|
||||
filename: `stats/${pkg.name}${minify ? '-min' : ''}.html`
|
||||
})
|
||||
].filter(Boolean)
|
||||
}
|
||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020-2023 Paweł Kuna
|
||||
Copyright (c) 2020-2024 Paweł Kuna
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
"svgpath": "^2.6.0",
|
||||
"svgson": "^5.3.1",
|
||||
"typescript": "^5.3.3",
|
||||
"vitest": "^1.2.1"
|
||||
"vitest": "^1.1.3"
|
||||
},
|
||||
"release-it": {
|
||||
"plugins": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import { getRollupPlugins } from '../../.build/build-icons.mjs'
|
||||
import { getRollupPlugins } from '../../.build/rollup-plugins.mjs'
|
||||
import dts from "rollup-plugin-dts";
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
||||
|
|
@ -38,7 +38,7 @@ const configs = bundles
|
|||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: getRollupPlugins(pkg, minify),
|
||||
external: ['preact', 'prop-types'],
|
||||
external: ['preact'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
|
|
@ -52,8 +52,7 @@ const configs = bundles
|
|||
format,
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
preact: 'preact',
|
||||
'prop-types': 'PropTypes',
|
||||
preact: 'preact'
|
||||
},
|
||||
},
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -40,13 +40,12 @@
|
|||
"@tabler/icons": "3.0.0-alpha.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "7.11.5",
|
||||
"@babel/preset-react": "7.10.4",
|
||||
"@babel/preset-env": "7.23.8",
|
||||
"@babel/preset-react": "7.23.3",
|
||||
"@testing-library/react": "^14.1.2",
|
||||
"@types/react": "18.2.0",
|
||||
"@types/react": "18.2.48",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"babel-jest": "^29.4.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"babel-jest": "^29.7.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-test-renderer": "18.2.0"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import { getRollupPlugins } from '../../.build/build-icons.mjs'
|
||||
import { getRollupPlugins } from '../../.build/rollup-plugins.mjs'
|
||||
import dts from "rollup-plugin-dts";
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
||||
|
|
@ -38,7 +38,7 @@ const configs = bundles
|
|||
inputs.map(input => ({
|
||||
input,
|
||||
plugins: getRollupPlugins(pkg, minify),
|
||||
external: ['react', 'prop-types'],
|
||||
external: ['react'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
|
|
@ -52,8 +52,7 @@ const configs = bundles
|
|||
sourcemap: true,
|
||||
preserveModules,
|
||||
globals: {
|
||||
react: 'react',
|
||||
'prop-types': 'PropTypes'
|
||||
react: 'react'
|
||||
},
|
||||
},
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import { getRollupPlugins } from '../../.build/build-icons.mjs'
|
||||
import { getRollupPlugins } from '../../.build/rollup-plugins.mjs'
|
||||
import dts from "rollup-plugin-dts";
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import { getRollupPlugins } from '../../.build/build-icons.mjs'
|
||||
import { getRollupPlugins } from '../../.build/rollup-plugins.mjs'
|
||||
import dts from "rollup-plugin-dts";
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import { getRollupPlugins } from '../../.build/build-icons.mjs'
|
||||
import { getRollupPlugins } from '../../.build/rollup-plugins.mjs'
|
||||
import dts from "rollup-plugin-dts";
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
||||
|
|
|
|||
659
pnpm-lock.yaml
659
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -15,10 +15,10 @@
|
|||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^4.0.0"
|
||||
"@types/react": "^18.2.48",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.11"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue