File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ module.exports = (api) => {
2222 } ,
2323 ] ,
2424 ] ,
25- plugins : [ [ '@babel/plugin-transform-react-jsx' ] ] ,
25+ plugins : [
26+ [ '@babel/plugin-transform-react-jsx' ] ,
27+ [
28+ 'module-resolver' ,
29+ {
30+ root : [ './src' ] ,
31+ alias : {
32+ react : 'preact/compat' ,
33+ 'react-dom' : 'preact/compat' ,
34+ } ,
35+ } ,
36+ ] ,
37+ ] ,
2638 } ;
2739} ;
Original file line number Diff line number Diff line change 11import json from '@rollup/plugin-json' ;
2- import alias from '@rollup/plugin-alias' ;
32
43import { sharedPlugins } from '../autocomplete-core/rollup.config' ;
54
@@ -11,14 +10,5 @@ export default {
1110 sourcemap : true ,
1211 name : 'docsearch' ,
1312 } ,
14- plugins : [
15- json ( ) ,
16- alias ( {
17- entries : [
18- { find : 'react' , replacement : 'preact/compat' } ,
19- { find : 'react-dom' , replacement : 'preact/compat' } ,
20- ] ,
21- } ) ,
22- ...sharedPlugins ,
23- ] ,
13+ plugins : [ json ( ) , ...sharedPlugins ] ,
2414} ;
You can’t perform that action at this time.
0 commit comments