Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set "type": "module" to package.json #442

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
22 changes: 11 additions & 11 deletions .size-limit.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
[
{
"name": "Total",
"path": "lib/index.mjs",
"path": "lib/index.js",
"import": "*",
"limit": "5.5 kB"
},
{
"name": "VList",
"path": "lib/index.mjs",
"path": "lib/index.js",
"import": "{ VList }",
"limit": "4 kB"
},
{
"name": "Virtualizer",
"path": "lib/index.mjs",
"path": "lib/index.js",
"import": "{ Virtualizer }",
"limit": "4 kB"
},
{
"name": "WindowVirtualizer",
"path": "lib/index.mjs",
"path": "lib/index.js",
"import": "{ WindowVirtualizer }",
"limit": "4 kB"
},
{
"name": "VGrid",
"path": "lib/index.mjs",
"path": "lib/index.js",
"import": "{ experimental_VGrid }",
"limit": "4 kB"
},
{
"name": "vue VList",
"path": "lib/vue/index.mjs",
"path": "lib/vue/index.js",
"import": "{ VList }",
"limit": "4 kB"
},
{
"name": "vue Virtualizer",
"path": "lib/vue/index.mjs",
"path": "lib/vue/index.js",
"import": "{ Virtualizer }",
"limit": "4 kB"
},
{
"name": "vue WindowVirtualizer",
"path": "lib/vue/index.mjs",
"path": "lib/vue/index.js",
"import": "{ WindowVirtualizer }",
"limit": "4 kB"
},
{
"name": "solid VList",
"path": "lib/solid/index.mjs",
"path": "lib/solid/index.js",
"import": "{ VList }",
"limit": "4 kB"
},
{
"name": "solid Virtualizer",
"path": "lib/solid/index.mjs",
"path": "lib/solid/index.js",
"import": "{ Virtualizer }",
"limit": "4 kB"
},
{
"name": "solid WindowVirtualizer",
"path": "lib/solid/index.mjs",
"path": "lib/solid/index.js",
"import": "{ WindowVirtualizer }",
"limit": "4 kB"
},
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@
"name": "virtua",
"version": "0.30.4",
"description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue and Solid.",
"main": "lib/index.js",
"module": "lib/index.mjs",
"main": "lib/index.cjs",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./lib/index.d.ts",
"import": "./lib/index.mjs",
"default": "./lib/index.js"
"import": "./lib/index.js",
"default": "./lib/index.cjs"
},
"./vue": {
"types": "./lib/vue/index.d.ts",
"import": "./lib/vue/index.mjs",
"default": "./lib/vue/index.js"
"import": "./lib/vue/index.js",
"default": "./lib/vue/index.cjs"
},
"./solid": {
"types": "./lib/solid/index.d.ts",
"import": "./lib/solid/index.mjs",
"default": "./lib/solid/index.js"
"import": "./lib/solid/index.js",
"default": "./lib/solid/index.cjs"
}
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs → rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import terser from "@rollup/plugin-terser";
import { babel, getBabelOutputPlugin } from "@rollup/plugin-babel";
import banner from "rollup-plugin-banner2";
import pkg from "./package.json" assert { type: "json" };
import vueVNodePlugin from "./scripts/babel-plugin-annotate-vue-vnode.mjs";
import vueVNodePlugin from "./scripts/babel-plugin-annotate-vue-vnode.js";

const external = (id) =>
[
Expand Down
Loading