Skip to content

Commit 954597e

Browse files
feat: default output is esm, closes #3
1 parent af82598 commit 954597e

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

package-lock.json

+14-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"name": "@ionited/mask-svelte",
33
"version": "0.3.0",
44
"description": "Create your masks for Svelte easily",
5-
"main": "./dist/index.js",
5+
"main": "./dist/index.esm.js",
66
"module": "./dist/index.esm.js",
7+
"browser": "./dist/index.js",
78
"types": "./dist/index.d.ts",
89
"type": "module",
910
"scripts": {
@@ -25,13 +26,13 @@
2526
},
2627
"homepage": "https://github.com/ionited/mask-svelte#readme",
2728
"dependencies": {
28-
"@ionited/mask": "^0.6.2"
29+
"@ionited/mask": "^0.6.3"
2930
},
3031
"devDependencies": {
3132
"@rollup/plugin-node-resolve": "^13.3.0",
3233
"rollup-plugin-terser": "^7.0.2",
3334
"rollup-plugin-typescript2": "^0.36.0",
34-
"typescript": "^5.2.2"
35+
"typescript": "^5.5.2"
3536
},
3637
"files": [
3738
"dist/**/*"

rollup.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import pkg from './package.json';
66
export default {
77
input: './src/index.ts',
88
output: [{
9-
file: pkg.module,
9+
file: pkg.main,
1010
format: 'esm',
1111
sourcemap: true
1212
}, {
13-
file: pkg.main,
13+
file: pkg.browser,
1414
format: 'umd',
1515
name: 'window',
1616
sourcemap: true,

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1212

1313
/* Language and Environment */
14-
"target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14+
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
1515
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
1616
// "jsx": "preserve", /* Specify what JSX code is generated. */
1717
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
@@ -24,7 +24,7 @@
2424
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
2525

2626
/* Modules */
27-
"module": "ES6", /* Specify what module code is generated. */
27+
"module": "ESNext", /* Specify what module code is generated. */
2828
// "rootDir": "./", /* Specify the root folder within your source files. */
2929
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
3030
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */

0 commit comments

Comments
 (0)