Fix missing Envrionemnt
This commit is contained in:
parent
ee9b8102f2
commit
d886458832
6
doric-web/dist/index.js
vendored
6
doric-web/dist/index.js
vendored
@ -1,4 +1,7 @@
|
||||
|
||||
const Environment = {
|
||||
platform:"web"
|
||||
};
|
||||
/**++++++++SandBox++++++++*/
|
||||
var doric = (function (exports) {
|
||||
'use strict';
|
||||
@ -3905,12 +3908,13 @@ exports.Display = void 0;
|
||||
exports.jsx = void 0;
|
||||
(function (jsx) {
|
||||
function createElement(constructor, config, ...children) {
|
||||
var _a;
|
||||
if (!!constructor.isViewClass) {
|
||||
const e = new constructor();
|
||||
if (e instanceof Fragment) {
|
||||
return children;
|
||||
}
|
||||
e.layoutConfig = layoutConfig().fit();
|
||||
e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit();
|
||||
if (config) {
|
||||
e.apply(config);
|
||||
}
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,14 +1,23 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import jsonPlugin from '@rollup/plugin-json'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import jsonPlugin from "@rollup/plugin-json";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const sandboxBundle = fs.readFileSync(path.resolve("./node_modules/doric/bundle/doric-sandbox.js"), 'utf-8')
|
||||
const sandboxBundle = fs.readFileSync(
|
||||
path.resolve("./node_modules/doric/bundle/doric-sandbox.js"),
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
const doricLibBundle = fs.readFileSync(path.resolve("./node_modules/doric/bundle/doric-lib.js"), 'utf-8')
|
||||
const doricLibBundle = fs.readFileSync(
|
||||
path.resolve("./node_modules/doric/bundle/doric-lib.js"),
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
const builtinScript = `
|
||||
const Environment = {
|
||||
platform:"web"
|
||||
};
|
||||
/**++++++++SandBox++++++++*/
|
||||
${sandboxBundle}
|
||||
/**--------SandBox--------*/
|
||||
@ -20,29 +29,27 @@ ${doricLibBundle}
|
||||
return __module.exports;
|
||||
},this,[{exports:{}}])]);
|
||||
/**--------Lib--------*/
|
||||
`
|
||||
`;
|
||||
|
||||
export default {
|
||||
input: `build/index.js`,
|
||||
output: {
|
||||
format: "iife",
|
||||
name: "doric_web",
|
||||
file: `dist/index.js`,
|
||||
sourcemap: true,
|
||||
banner: builtinScript,
|
||||
globals: {
|
||||
doric: "doric_lib",
|
||||
'doric/src/runtime/sandbox': 'doric',
|
||||
},
|
||||
input: `build/index.js`,
|
||||
output: {
|
||||
format: "iife",
|
||||
name: "doric_web",
|
||||
file: `dist/index.js`,
|
||||
sourcemap: true,
|
||||
banner: builtinScript,
|
||||
globals: {
|
||||
doric: "doric_lib",
|
||||
"doric/src/runtime/sandbox": "doric",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
commonjs(),
|
||||
jsonPlugin(),
|
||||
],
|
||||
external: ['axios', 'reflect-metadata', 'doric'],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
},
|
||||
}
|
||||
},
|
||||
plugins: [resolve({ mainFields: ["jsnext"] }), commonjs(), jsonPlugin()],
|
||||
external: ["axios", "reflect-metadata", "doric"],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
import axios from 'axios'
|
||||
import { loadDoricJSBundle } from './DoricBundleLoader'
|
||||
import { DoricContext } from './DoricContext'
|
||||
|
||||
|
Reference in New Issue
Block a user