You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/web/.ministarrc.js

36 lines
891 B
JavaScript

const copy = require('rollup-plugin-copy');
const replace = require('rollup-plugin-replace');
const path = require('path');
module.exports = {
externalDeps: [
'react',
'axios', // Use for some deps which will use axios and reduce bundle size
],
rollupPlugins: ({ pluginName }) => [
copy({
targets: [
{
src: path.resolve(
__dirname,
`./plugins/${pluginName}`,
'./assets/**/*'
),
dest: path.resolve(__dirname, `./dist/plugins/${pluginName}/assets/`),
},
{
src: path.resolve(
__dirname,
`./plugins/${pluginName}`,
'./README.md'
),
dest: path.resolve(__dirname, `./dist/plugins/${pluginName}/`),
},
],
}),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
],
};