You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/blocks/rollup.config.mjs

41 lines
755 B

import summary from 'rollup-plugin-summary'
import terser from '@rollup/plugin-terser'
import resolve from '@rollup/plugin-node-resolve'
import graphql from '@rollup/plugin-graphql'
import * as glob from 'glob'
export default {
input: Object.fromEntries(
glob.sync('@(block-*)/component.js', {
ignore: [
'dist/**',
'node_modules/**'
]
}).map(file => {
const fileParts = file.split('/')
return [
fileParts[0],
file
]
})
),
output: {
dir: 'dist',
format: 'es',
globals: {
APOLLO_CLIENT: 'APOLLO_CLIENT'
}
},
plugins: [
resolve(),
graphql(),
terser({
ecma: 2017,
module: true,
warnings: true
}),
summary()
]
}