File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
packages/react-google-charts Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
- import { dirname , join } from "path" ;
2
- const path = require ( "path" ) ;
1
+ import { dirname , join , resolve } from "path" ;
2
+ import { createRequire } from "module" ;
3
3
4
- module . exports = {
4
+ const require = createRequire ( import . meta. url ) ;
5
+
6
+ export default {
5
7
stories : [ "../stories/*.tsx" ] ,
6
8
7
9
addons : [
@@ -13,10 +15,7 @@ module.exports = {
13
15
] ,
14
16
15
17
webpackFinal ( config ) {
16
- config . resolve . alias [ "react-google-charts" ] = path . resolve (
17
- __dirname ,
18
- "../src" ,
19
- ) ;
18
+ config . resolve . alias [ "react-google-charts" ] = resolve ( __dirname , "../src" ) ;
20
19
return config ;
21
20
} ,
22
21
Original file line number Diff line number Diff line change 1
1
import { default as swc } from "rollup-plugin-swc" ;
2
2
import { nodeResolve } from "@rollup/plugin-node-resolve" ;
3
- import pkg from "./package.json" assert { type : "json " } ;
3
+ import pkg from "./package.json" with { type : "json" } ;
4
4
5
5
const swcPlugin = swc . default ;
6
6
const extensions = [ ".js" , ".ts" , ".tsx" ] ;
You can’t perform that action at this time.
0 commit comments