File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
- import libBundles from "./rollup.lib" ;
2
- import mdBundles from "./rollup.markdown-parser" ;
1
+ import libBundles from "./rollup.lib.mjs " ;
2
+ import mdBundles from "./rollup.markdown-parser.mjs " ;
3
3
4
4
let exports = [ ] ;
5
5
Original file line number Diff line number Diff line change 1
1
import resolve from "@rollup/plugin-node-resolve" ;
2
2
import json from "@rollup/plugin-json" ;
3
- import babel from "@rollup/plugin-babel" ;
3
+ import { babel } from "@rollup/plugin-babel" ;
4
4
import { terser } from "rollup-plugin-terser" ;
5
5
import bundleSize from "rollup-plugin-bundle-size" ;
6
- import pkg from "./package.json" ;
7
6
import typescript from "@rollup/plugin-typescript" ;
7
+ import fs from "fs/promises" ;
8
+
9
+ const pkg = JSON . parse ( await fs . readFile ( "./package.json" , "utf8" ) ) ;
8
10
9
11
const sourcemapOption = process . env . PROD ? undefined : "inline" ;
10
12
Original file line number Diff line number Diff line change 1
1
import resolve from "@rollup/plugin-node-resolve" ;
2
2
import commonjs from "@rollup/plugin-commonjs" ;
3
- import babel from "@rollup/plugin-babel" ;
3
+ import { babel } from "@rollup/plugin-babel" ;
4
4
import json from "@rollup/plugin-json" ;
5
5
import { terser } from "rollup-plugin-terser" ;
6
6
import bundleSize from "rollup-plugin-bundle-size" ;
@@ -9,9 +9,8 @@ import hash from "rollup-plugin-hash";
9
9
import postcss from "rollup-plugin-postcss" ;
10
10
import postcssImport from "postcss-import" ;
11
11
import del from "rollup-plugin-delete" ;
12
-
13
- const fs = require ( "fs" ) ;
14
- const mkdirp = require ( "mkdirp" ) ;
12
+ import fs from "fs" ;
13
+ import mkdirp from "mkdirp" ;
15
14
16
15
const writeIndexHtmlToBuild = bundleName => {
17
16
let indexHtml = fs . readFileSync (
You can’t perform that action at this time.
0 commit comments