fix production build - run code when component is mounted

This commit is contained in:
2022-11-15 01:17:14 +01:00
parent 8a2523e9da
commit fbfd3ec2cc

View File

@@ -1,7 +1,7 @@
<script>
import Worker from '../file.worker.js?worker';
const worker = new Worker();
// const worker = new Worker();
// const lodash = await fetch('https://registry.npmjs.org/lodash');
@@ -47,17 +47,18 @@ for (let i = 0; i < 42; ++i) {
// return ...
}
this.run(code);
return {
code,
extensions,
handleReady,
log: console.log,
worker,
worker: null,
result: '',
}
},
mounted() {
this.run(this.code);
},
methods: {
run(code) {
this.terminate();