-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
36 lines (35 loc) · 1.18 KB
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import commonjs from "@rollup/plugin-commonjs";
import terser from "@rollup/plugin-terser";
import serve from "rollup-plugin-serve";
import copy from 'rollup-plugin-copy'
export default {
input: "app.ts",
output: [
{
format: "esm",
file: "build/bundle.js",
},
],
plugins: [
resolve(),
commonjs(),
typescript(), // Добавляем поддержку TypeScript
// terser(), // Опционально: минификация для продакшн-сборки
serve({
// Настраиваем плагин serve
open: true, // Опционально: открыть в браузере автоматически
contentBase: ["", "public"], // Корневые директории для сервера
host: "localhost",
port: 3000, // Порт, на котором будет запущен сервер
}),
copy({
targets: [
{ src: ['index.html', 'styles.css'], dest: 'build' },
{ src: 'models', dest: 'build' },
{ src: 'web-ifc.wasm', dest: 'build' },
]
}),
],
};