Skip to content

Commit 1deaf81

Browse files
committed
fix: update rollup config for ts
1 parent fbba25e commit 1deaf81

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

rollup.config.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { babel } from "@rollup/plugin-babel";
2+
import typescript from '@rollup/plugin-typescript';
23
import { terser } from "rollup-plugin-terser";
34
import scss from "rollup-plugin-scss";
4-
import modify from 'rollup-plugin-modify'
55

66
export default {
7-
input: "src/lazyframe.js",
7+
input: "src/lazyframe.ts",
88
output: {
99
file: "dist/lazyframe.min.js",
1010
format: "umd",
@@ -13,18 +13,19 @@ export default {
1313
sourcemap: false,
1414
},
1515
plugins: [
16-
modify({
17-
find: "import './scss/lazyframe.scss?raw';",
18-
replace: "import './scss/lazyframe.scss';",
19-
}),
16+
typescript(),
17+
2018
babel({
2119
exclude: "node_modules/**",
2220
babelHelpers: "bundled",
21+
extensions: ['.js', '.ts'],
2322
}),
23+
2424
terser(),
25+
2526
scss({
2627
output: "dist/lazyframe.css",
2728
outputStyle: "compressed",
2829
}),
2930
],
30-
};
31+
};

0 commit comments

Comments
 (0)