Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
node: true

parserOptions:
ecmaVersion: 2021
ecmaVersion: 2022
sourceType: module
ecmaFeatures:
impliedStrict: true
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ jobs:
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

size-limit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: andresz1/size-limit-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
55 changes: 55 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
function modifyWebpackConfig(config) {
config.target = 'web';

return config;
}

module.exports = [
{
path: 'dist/chart.js',
limit: '94.8 KB',
webpack: false,
running: false
},
{
path: 'dist/chart.esm.js',
limit: '75 KB',
webpack: false,
running: false
},
{
path: 'dist/chart.esm.js',
limit: '34 KB',
import: '{ Chart }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.esm.js',
limit: '19.5 KB',
import: '{ BarController, BubbleController, DoughnutController, LineController, PolarAreaController, PieController, RadarController, ScatterController }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.esm.js',
limit: '14 KB',
import: '{ ArcElement, LineElement, PointElement, BarElement }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.esm.js',
limit: '27 KB',
import: '{ Decimation, Filler, Legend, SubTitle, Title, Tooltip }',
running: false,
modifyWebpackConfig
},
{
path: 'dist/chart.esm.js',
limit: '22 KB',
import: '{ CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale }',
running: false,
modifyWebpackConfig
}
]
2 changes: 2 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ module.exports = {
}
}
})

config.module.rule('js').test(/\.m?jsx?$/)
},
markdown: {
extendMarkdown: md => {
Expand Down
Loading