Commit 72c2667c authored by 崔佳豪's avatar 崔佳豪

fix: window.app 导出react/jsx-runtime

parent 6d04fb61
Pipeline #54525 canceled with stages
......@@ -276,7 +276,7 @@ window.app = {
let keys = context.keys();
for (let key of keys) {
let parts = name.indexOf('@') > -1 ? [name, ...(key.slice(1).split('/'))] : (name + key.slice(1)).split('/');
let parts = name.indexOf('@') > -1 || name == 'react/jsx-runtime' ? [name, ...(key.slice(1).split('/'))] : (name + key.slice(1)).split('/');
parts = parts.filter(item => item !== "");
let dir = this.modules;
for (let i = 0; i < parts.length - 1; i++) {
......@@ -301,6 +301,7 @@ window.app = {
// window.app.define('city-data', require.context('./components/CitySelector', true, /^.\/(CitySelector\/)?[^\/]+\.js$/), 'city-data.js')
window.app.define('react', require.context('react', true, /^.\/index\.js$/), 'index.js');
window.app.define('react/jsx-runtime', require.context('../node_modules/react', true, /^.\/jsx-runtime\.js$/), 'jsx-runtime.js');
window.app.define('react-dom', require.context('react-dom', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-router', require.context('react-router', true, /^.\/index\.js$/), 'index.js');
window.app.define('lodash', require.context('lodash', true, /^.\/index\.js$/), 'index.js');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment