fix multipage build
This commit is contained in:
parent
321ecd7364
commit
5168fa1d68
|
|
@ -1,3 +1,4 @@
|
||||||
dist
|
dist
|
||||||
.vite
|
.vite
|
||||||
node_modules
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,13 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
spatial-geometry {
|
fc-geometry {
|
||||||
background: rgb(187, 178, 178);
|
background: rgb(187, 178, 178);
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 1.95px 1.95px 2.6px;
|
box-shadow: rgba(0, 0, 0, 0.2) 1.95px 1.95px 2.6px;
|
||||||
transition: scale 100ms ease-out, box-shadow 100ms ease-out;
|
transition: scale 100ms ease-out, box-shadow 100ms ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
spatial-geometry:state(move) {
|
fc-geometry:state(move) {
|
||||||
scale: 1.05;
|
scale: 1.05;
|
||||||
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
@ -69,16 +69,16 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<spatial-geometry x="100" y="100" width="50" height="50"></spatial-geometry>
|
<fc-geometry x="100" y="100" width="50" height="50"></fc-geometry>
|
||||||
<spatial-geometry x="100" y="200" width="50" height="50"></spatial-geometry>
|
<fc-geometry x="100" y="200" width="50" height="50"></fc-geometry>
|
||||||
<spatial-geometry x="100" y="300" width="50" height="50"></spatial-geometry>
|
<fc-geometry x="100" y="300" width="50" height="50"></fc-geometry>
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { SpatialGeometry } from '../src/canvas/spatial-geometry.ts';
|
import { FolkGeometry } from '../src/canvas/fc-geometry.ts';
|
||||||
|
|
||||||
SpatialGeometry.register();
|
FolkGeometry.register();
|
||||||
|
|
||||||
const geos = document.querySelectorAll('spatial-geometry');
|
const geos = document.querySelectorAll('fc-geometry');
|
||||||
|
|
||||||
geos.forEach((el, i) => (el.style.viewTransitionName = `b${i}`));
|
geos.forEach((el, i) => (el.style.viewTransitionName = `b${i}`));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { resolve } from 'node:path';
|
||||||
|
import { readdirSync } from 'node:fs';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
target: 'esnext',
|
||||||
|
rollupOptions: {
|
||||||
|
input: readdirSync(__dirname)
|
||||||
|
.filter((file) => file.endsWith('.html'))
|
||||||
|
.reduce((acc, file) => {
|
||||||
|
acc[file.replace('.html', '')] = resolve(__dirname, file);
|
||||||
|
return acc;
|
||||||
|
}, {} as Record<string, string>),
|
||||||
|
},
|
||||||
|
modulePreload: {
|
||||||
|
polyfill: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue