-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,42 @@ | ||
import resolve from "rollup-plugin-node-resolve"; | ||
import typescript from "rollup-plugin-typescript2"; | ||
import babel from "rollup-plugin-babel"; | ||
import { terser } from "rollup-plugin-terser"; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import nodeResolve from 'rollup-plugin-node-resolve'; | ||
import babel from 'rollup-plugin-babel'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import serve from 'rollup-plugin-serve'; | ||
import json from '@rollup/plugin-json'; | ||
|
||
export default { | ||
input: ["src/boilerplate-card.ts"], | ||
output: { | ||
dir: "./dist", | ||
format: "es" | ||
const dev = process.env.ROLLUP_WATCH; | ||
|
||
const serveopts = { | ||
contentBase: ['./dist'], | ||
host: '0.0.0.0', | ||
port: 5000, | ||
allowCrossOrigin: true, | ||
headers: { | ||
'Access-Control-Allow-Origin': '*', | ||
}, | ||
plugins: [ | ||
resolve(), | ||
typescript(), | ||
babel({ | ||
exclude: "node_modules/**" | ||
}), | ||
terser(), | ||
] | ||
}; | ||
|
||
const plugins = [ | ||
nodeResolve({}), | ||
commonjs(), | ||
typescript(), | ||
json(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
}), | ||
dev && serve(serveopts), | ||
!dev && terser(), | ||
]; | ||
|
||
export default [ | ||
{ | ||
input: 'src/boilerplate-card.ts', | ||
output: { | ||
dir: 'dist', | ||
format: 'es', | ||
}, | ||
plugins: [...plugins], | ||
}, | ||
]; |