1 Star 0 Fork 8

丷泡泡o0O/mini-sandbox

forked from buuing/mini-sandbox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.dev.js 2.52 KB
一键复制 编辑 原始数据 按行查看 历史
ldq 提交于 2022-04-01 19:57 . build: upgrade to v0.3.0 增加 react-loader
import path from 'path'
import ts from 'rollup-plugin-typescript2'
import json from '@rollup/plugin-json'
import babel from 'rollup-plugin-babel'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import styles from 'rollup-plugin-styles'
import livereload from 'rollup-plugin-livereload'
import serve from 'rollup-plugin-serve'
import eslint from '@rollup/plugin-eslint'
import pkg from './package.json'
export default [
{
input: 'src/index.ts',
output: [
{
file: `${pkg.jsdelivr}`,
format: 'umd',
name: 'MiniSandbox',
sourcemap: true,
},
],
plugins: [
eslint({
include: ['src/**/*.js', 'src/**/*.ts'],
}),
styles(),
ts({
tsconfig: path.resolve(__dirname, './tsconfig.json'),
extensions: ['.js', '.ts'],
}),
json(),
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs(),
livereload(),
serve({
open: true,
openPage: '/demo.html',
contentBase: './',
}),
],
},
// docsify plugin
{
input: 'src/plugins/docsify-plugin.ts',
output: [
{
file: 'dist/docsify-plugin.js',
format: 'umd',
name: 'SandboxDocsifyPlugin',
sourcemap: false,
},
],
plugins: [
ts({
tsconfig: path.resolve(__dirname, './tsconfig.json'),
extensions: ['.js', '.ts'],
declaration: true,
}),
json(),
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs(),
],
},
// vue loader
{
input: 'src/loaders/vue-loader.ts',
output: [
{
file: 'dist/vue-loader.js',
format: 'umd',
name: 'SandboxVueLoader',
sourcemap: false,
},
],
plugins: [
ts({
tsconfig: path.resolve(__dirname, './tsconfig.json'),
extensions: ['.js', '.ts'],
declaration: true,
}),
json(),
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs(),
],
},
// react loader
{
input: 'src/loaders/react-loader.ts',
output: [
{
file: 'dist/react-loader.js',
format: 'umd',
name: 'SandboxReactLoader',
sourcemap: false,
},
],
plugins: [
ts({
tsconfig: path.resolve(__dirname, './tsconfig.json'),
extensions: ['.js', '.ts'],
declaration: true,
}),
json(),
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs(),
],
},
]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/qq1099719995/mini-sandbox.git
git@gitee.com:qq1099719995/mini-sandbox.git
qq1099719995
mini-sandbox
mini-sandbox
master

搜索帮助