Allen's blog Allen's blog
首页
面经
算法 (opens new window)
分类

Allen

前端CV工程师
首页
面经
算法 (opens new window)
分类
  • Javascript

  • TypeScript

  • CSS

  • Vue

  • React

  • 框架和构建工具

    • rollup使用配置文件rollup.config.ts打包
    • webpack学习笔记
    • vite学习笔记
    • PostCSS学习笔记
    • nuxt3项目搭建与配置
    • ts、vite、vitepress配置别名alias
  • 工具库

  • 常见业务场景

  • Bug

  • 项目实战

  • 前端
  • 框架和构建工具
Allen
2023-12-08

rollup使用配置文件rollup.config.ts打包

直接使用rollup -c rollup.config.ts命令进行打包会报错

$ rollup -c rollup.config.ts
[!] Error: Unexpected token
rollup.config.ts (4:12)
2: import {RollupFileOptions} from "rollup";
3:
4: const config: RollupFileOptions = {
                 ^
1
2
3
4
5
6
7

解决方案

参考链接:Does rollup support typescript in rollup config file? (opens new window)

rollup --config rollup.config.ts --configPlugin typescript
1
上次更新: 2023/12/16, 09:22:46
react路由懒加载
webpack学习笔记

← react路由懒加载 webpack学习笔记→

最近更新
01
package.json导出类型
12-08
02
关键问题方案
11-17
03
启动web项目提示无端口权限
11-17
更多文章>
Theme by Vdoing | Copyright © 2023-2023 Allen | Github
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式