diff --git a/create-vite-app/template-react/package.json b/create-vite-app/template-react/package.json index 0339f05b5187f3..4228c6996ba8e9 100644 --- a/create-vite-app/template-react/package.json +++ b/create-vite-app/template-react/package.json @@ -2,13 +2,14 @@ "name": "vite-react-starter", "version": "0.0.0", "scripts": { - "dev": "vite --jsx react", - "build": "vite build --jsx react" + "dev": "vite serve src --jsx react", + "build": "vite build src --jsx react" }, "dependencies": { - "es-react": "^16.12.0" + "@pika/react": "^16.13.1", + "@pika/react-dom": "^16.13.1" }, "devDependencies": { "vite": "^0.14.2" } -} \ No newline at end of file +} diff --git a/create-vite-app/template-react/App.css b/create-vite-app/template-react/src/App.css similarity index 100% rename from create-vite-app/template-react/App.css rename to create-vite-app/template-react/src/App.css diff --git a/create-vite-app/template-react/App.jsx b/create-vite-app/template-react/src/App.jsx similarity index 94% rename from create-vite-app/template-react/App.jsx rename to create-vite-app/template-react/src/App.jsx index 8929b2dbc4f6d0..1013d536bb73b8 100644 --- a/create-vite-app/template-react/App.jsx +++ b/create-vite-app/template-react/src/App.jsx @@ -1,4 +1,4 @@ -import { React } from 'es-react' +import React from 'react' import logo from './logo.svg' import './App.css' diff --git a/create-vite-app/template-react/index.css b/create-vite-app/template-react/src/index.css similarity index 100% rename from create-vite-app/template-react/index.css rename to create-vite-app/template-react/src/index.css diff --git a/create-vite-app/template-react/index.html b/create-vite-app/template-react/src/index.html similarity index 100% rename from create-vite-app/template-react/index.html rename to create-vite-app/template-react/src/index.html diff --git a/create-vite-app/template-react/logo.svg b/create-vite-app/template-react/src/logo.svg similarity index 100% rename from create-vite-app/template-react/logo.svg rename to create-vite-app/template-react/src/logo.svg diff --git a/create-vite-app/template-react/main.jsx b/create-vite-app/template-react/src/main.jsx similarity index 72% rename from create-vite-app/template-react/main.jsx rename to create-vite-app/template-react/src/main.jsx index 6a4909c44c6c56..606a3cf44ec02b 100644 --- a/create-vite-app/template-react/main.jsx +++ b/create-vite-app/template-react/src/main.jsx @@ -1,4 +1,5 @@ -import { React, ReactDOM } from 'es-react' +import React from 'react' +import ReactDOM from 'react-dom' import './index.css' import App from './App' diff --git a/create-vite-app/template-react/vite.config.js b/create-vite-app/template-react/vite.config.js new file mode 100644 index 00000000000000..1265efff061339 --- /dev/null +++ b/create-vite-app/template-react/vite.config.js @@ -0,0 +1,6 @@ +module.exports = { + alias: { + react: '@pika/react', + 'react-dom': '@pika/react-dom' + } +}