Skip to content

Commit d2afae1

Browse files
authored
chore: change Rollup config to ESM, fix scripts (#98)
1 parent f9549b8 commit d2afae1

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
]
245245
},
246246
"dist": {
247-
"command": "rollup -c rollup.config.cjs",
247+
"command": "rollup -c",
248248
"dependencies": [
249249
"clean",
250250
"build"
@@ -257,7 +257,7 @@
257257
]
258258
},
259259
"lint": {
260-
"command": "eslint src --ext .ts"
260+
"command": "eslint . --ext .ts --ext .js --ignore-path .gitignore"
261261
},
262262
"size": {
263263
"command": "size-limit",

rollup.config.cjs

-15
This file was deleted.

rollup.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { nodeResolve } from '@rollup/plugin-node-resolve';
2+
import { terser } from 'rollup-plugin-terser';
3+
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';
4+
5+
export default {
6+
input: './index.html',
7+
output: {
8+
dir: './dist'
9+
},
10+
plugins: [
11+
html(),
12+
nodeResolve(),
13+
terser()
14+
]
15+
};

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"strict": true,
2020
"allowSyntheticDefaultImports": true
2121
},
22-
"include": ["src/**/*.ts"],
22+
"include": ["src/**/*.ts", "demo/*.js", "*.js"],
2323
"exclude": []
2424
}

0 commit comments

Comments
 (0)