This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/js-framework/rollup.config.js
2019-07-22 14:36:32 +08:00

44 lines
1.0 KiB
JavaScript

const path = require('path')
const fs = require('fs')
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
export default [
{
input: "build/index.runtime.js",
output: {
name: "doric",
format: "iife",
file: "bundle/doric-sandbox.js",
},
sourceMap: true,
plugins: [
resolve({ jsnext: true, main: true }),
]
},
{
input: "build/index.js",
output: {
format: "cjs",
file: "bundle/doric-lib.js",
},
sourceMap: true,
plugins: [
resolve({ jsnext: true, main: true }),
],
external: ['reflect-metadata']
},
{
input: "build/demo.js",
output: {
format: "cjs",
file: "demo/demo.js",
},
sourceMap: true,
plugins: [
resolve({ jsnext: true, main: true }),
commonjs()
],
external: ['./index'],
},
]