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++++++++*/
|
/**++++++++SandBox++++++++*/
|
||||||
var doric = (function (exports) {
|
var doric = (function (exports) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -3905,12 +3908,13 @@ exports.Display = void 0;
|
|||||||
exports.jsx = void 0;
|
exports.jsx = void 0;
|
||||||
(function (jsx) {
|
(function (jsx) {
|
||||||
function createElement(constructor, config, ...children) {
|
function createElement(constructor, config, ...children) {
|
||||||
|
var _a;
|
||||||
if (!!constructor.isViewClass) {
|
if (!!constructor.isViewClass) {
|
||||||
const e = new constructor();
|
const e = new constructor();
|
||||||
if (e instanceof Fragment) {
|
if (e instanceof Fragment) {
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
e.layoutConfig = layoutConfig().fit();
|
e.layoutConfig = (_a = e.layoutConfig) !== null && _a !== void 0 ? _a : layoutConfig().fit();
|
||||||
if (config) {
|
if (config) {
|
||||||
e.apply(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 resolve from "@rollup/plugin-node-resolve";
|
||||||
import commonjs from '@rollup/plugin-commonjs'
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
import jsonPlugin from '@rollup/plugin-json'
|
import jsonPlugin from "@rollup/plugin-json";
|
||||||
import fs from 'fs'
|
import fs from "fs";
|
||||||
import path from 'path'
|
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 builtinScript = `
|
||||||
|
const Environment = {
|
||||||
|
platform:"web"
|
||||||
|
};
|
||||||
/**++++++++SandBox++++++++*/
|
/**++++++++SandBox++++++++*/
|
||||||
${sandboxBundle}
|
${sandboxBundle}
|
||||||
/**--------SandBox--------*/
|
/**--------SandBox--------*/
|
||||||
@ -20,29 +29,27 @@ ${doricLibBundle}
|
|||||||
return __module.exports;
|
return __module.exports;
|
||||||
},this,[{exports:{}}])]);
|
},this,[{exports:{}}])]);
|
||||||
/**--------Lib--------*/
|
/**--------Lib--------*/
|
||||||
`
|
`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: `build/index.js`,
|
input: `build/index.js`,
|
||||||
output: {
|
output: {
|
||||||
format: "iife",
|
format: "iife",
|
||||||
name: "doric_web",
|
name: "doric_web",
|
||||||
file: `dist/index.js`,
|
file: `dist/index.js`,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
banner: builtinScript,
|
banner: builtinScript,
|
||||||
globals: {
|
globals: {
|
||||||
doric: "doric_lib",
|
doric: "doric_lib",
|
||||||
'doric/src/runtime/sandbox': 'doric',
|
"doric/src/runtime/sandbox": "doric",
|
||||||
},
|
|
||||||
},
|
},
|
||||||
plugins: [
|
},
|
||||||
resolve({ mainFields: ["jsnext"] }),
|
plugins: [resolve({ mainFields: ["jsnext"] }), commonjs(), jsonPlugin()],
|
||||||
commonjs(),
|
external: ["axios", "reflect-metadata", "doric"],
|
||||||
jsonPlugin(),
|
onwarn: function (warning) {
|
||||||
],
|
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||||
external: ['axios', 'reflect-metadata', 'doric'],
|
return;
|
||||||
onwarn: function (warning) {
|
}
|
||||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
console.warn(warning.message);
|
||||||
console.warn(warning.message);
|
},
|
||||||
},
|
};
|
||||||
}
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import axios from 'axios'
|
|
||||||
import { loadDoricJSBundle } from './DoricBundleLoader'
|
import { loadDoricJSBundle } from './DoricBundleLoader'
|
||||||
import { DoricContext } from './DoricContext'
|
import { DoricContext } from './DoricContext'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user