First bit of real UI code landed

This commit is contained in:
Jake Archibald
2020-09-23 14:38:41 +01:00
parent 6573103755
commit 455c868e55
23 changed files with 839 additions and 141 deletions

View File

@@ -17,6 +17,7 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import OMT from '@surma/rollup-plugin-off-main-thread';
import replace from '@rollup/plugin-replace';
import simpleTS from './lib/simple-ts';
import clientBundlePlugin from './lib/client-bundle-plugin';
@@ -46,6 +47,8 @@ export default async function ({ watch }) {
);
await del('.tmp/build');
const isProduction = !watch;
const tsPluginInstance = simpleTS('.', {
watch,
});
@@ -84,7 +87,8 @@ export default async function ({ watch }) {
...commonPlugins(),
commonjs(),
resolve(),
terser({ module: true }),
replace({ __PRERENDER__: false, __PRODUCTION__: isProduction }),
//terser({ module: true }),
],
},
{
@@ -99,6 +103,7 @@ export default async function ({ watch }) {
emitFiles({ include: '**/*', root: path.join(__dirname, 'src', 'copy') }),
nodeExternalPlugin(),
imageWorkerPlugin(),
replace({ __PRERENDER__: true, __PRODUCTION__: isProduction }),
runScript(dir + '/index.js'),
],
};