refactor(rollup): cleanup tasks

This commit is contained in:
moklick
2021-01-20 14:35:09 +01:00
parent 27a98d6a8f
commit 301e2100a1
3 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ import postcss from 'rollup-plugin-postcss';
import livereload from 'rollup-plugin-livereload';
import serve from 'rollup-plugin-serve';
import libraryRollupConfig from './rollup.config.js';
import { baseConfig } from './rollup.config.js';
const isProd = process.env.NODE_ENV === 'production';
const isTesting = process.env.NODE_ENV === 'testing';
@@ -16,8 +16,8 @@ const isTesting = process.env.NODE_ENV === 'testing';
const serveFiles = !isProd || isTesting;
const doLiveReload = !isProd && !isTesting;
const rollupConfig = {
input: ['example/src/index.js'],
const rollupExamplesConfig = {
input: 'example/src/index.js',
output: [
{
dir: 'example/public/dist',
@@ -55,4 +55,4 @@ const rollupConfig = {
],
};
export default isTesting ? rollupConfig : [libraryRollupConfig, rollupConfig];
export default isTesting ? rollupExamplesConfig : [baseConfig(), rollupExamplesConfig];