initial commit
This commit is contained in:
parent
055685d85e
commit
02d281eef0
30 changed files with 36576 additions and 0 deletions
43
packages/lunetius/rollup.config.js
Normal file
43
packages/lunetius/rollup.config.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import url from '@rollup/plugin-url'
|
||||
import babel from '@rollup/plugin-babel'
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import json from '@rollup/plugin-json'
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
||||
// import postcss from 'rollup-plugin-postcss'
|
||||
import { main, module, name, version, description, author, license } from './package.json'
|
||||
|
||||
export default {
|
||||
input: 'src/index.js',
|
||||
output: [
|
||||
{
|
||||
file: main,
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
exports: 'default'
|
||||
},
|
||||
{
|
||||
file: module,
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
exports: 'default'
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
peerDepsExternal(),
|
||||
// postcss({ modules: true }),
|
||||
url({ exclude: ['**/*.svg'] }),
|
||||
babel({
|
||||
exclude: 'node_modules/**'
|
||||
}),
|
||||
resolve({ browser: true }),
|
||||
json(),
|
||||
commonjs(),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue