mirror of
https://github.com/wassname/template.git
synced 2026-07-17 11:33:44 +08:00
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import copy from 'rollup-plugin-copy';
|
|
import resolve from 'rollup-plugin-node-resolve';
|
|
import string from 'rollup-plugin-string';
|
|
import commonjs from 'rollup-plugin-commonjs';
|
|
// import babili from 'rollup-plugin-babili';
|
|
// import gzip from 'rollup-plugin-gzip';
|
|
import serve from 'rollup-plugin-serve';
|
|
|
|
const PORT = 8080;
|
|
console.log(`opening http://localhost:${PORT} .../`);
|
|
|
|
export default {
|
|
entry: 'components.js',
|
|
sourceMap: true,
|
|
targets: [
|
|
{
|
|
format: 'iife',
|
|
moduleName: 'dl',
|
|
dest: `dist/components.js`,
|
|
}
|
|
],
|
|
plugins: [
|
|
resolve({
|
|
jsnext: true,
|
|
browser: true,
|
|
}),
|
|
string({
|
|
include: ["**/*.txt", "**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
|
}),
|
|
commonjs(),
|
|
// babili({
|
|
// comments: false, // means: *remove comments
|
|
// sourceMap: true,
|
|
// }),
|
|
// gzip(), // just for testing -- firebase CDN gzips automatically
|
|
// serve({
|
|
// port: PORT,
|
|
// open: true,
|
|
// })
|
|
copy({
|
|
'node_modules/katex/dist/fonts': 'examples/fonts',
|
|
}),
|
|
]
|
|
};
|