mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
解决 sdk 版本, monaco-editor 的 worker 文件加载失败的问题。 (#1078)
This commit is contained in:
parent
12be84bd61
commit
89bf27e244
@ -220,8 +220,8 @@ function onLoad(req: any, callback: (result: any) => void) {
|
||||
baseUrl: '${config.paths.vs}',
|
||||
paths: ${JSON.stringify(config.paths)}
|
||||
};
|
||||
importScripts('${__uri(
|
||||
'monaco-editor/min/vs/base/worker/workerMain.js'
|
||||
importScripts('${filterUrl(
|
||||
__uri('monaco-editor/min/vs/base/worker/workerMain.js')
|
||||
)}');`)}`;
|
||||
}
|
||||
};
|
||||
|
@ -439,6 +439,10 @@ if (fis.project.currentMedia() === 'publish') {
|
||||
optimizer: null
|
||||
});
|
||||
|
||||
env.match('monaco-editor/**.css', {
|
||||
standard: false
|
||||
});
|
||||
|
||||
fis.on('compile:optimizer', function (file) {
|
||||
if (file.isJsLike && file.isMod) {
|
||||
var contents = file.getContent();
|
||||
|
@ -132,6 +132,7 @@ module.exports = function (ret, pack, settings, opt) {
|
||||
} catch (e) {
|
||||
d = (/((?:https?|file)\:.*)$/.test(e.stack) ? RegExp.$1 : '').replace(/\\/[^\\/]*$/, '');
|
||||
}
|
||||
amis.host = d;
|
||||
${contents.replace(/\"url\"\s*\:\s*('|")(\.\/.*)\1/g, function (
|
||||
_,
|
||||
quote,
|
||||
@ -141,7 +142,6 @@ module.exports = function (ret, pack, settings, opt) {
|
||||
})}
|
||||
})()`;
|
||||
}
|
||||
|
||||
jsContents += contents + ';\n';
|
||||
}
|
||||
} else if (
|
||||
|
Loading…
Reference in New Issue
Block a user