Skip to content

Commit

Permalink
feat: supports type module
Browse files Browse the repository at this point in the history
closes #32
  • Loading branch information
pd4d10 committed May 3, 2022
1 parent 5dab849 commit 5c5c00d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
"version": "2.0.0",
"description": "Vite plugin to transform SVGs into React components",
"main": "lib/index.js",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"exports": {
".": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
}
},
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"prepare": "npm run build"
"build": "tsc && tsc --module esnext --outDir temp && mv temp/index.js lib/index.mjs && rm -rf temp",
"prepare": "rm -rf lib && npm run build"
},
"repository": "pd4d10/vite-plugin-svgr",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
Expand Down

0 comments on commit 5c5c00d

Please sign in to comment.