From 1baa19aea52c20564bbcafae15ae412b59a7dea6 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Mon, 14 Oct 2019 11:17:36 +0800 Subject: [PATCH] build: use `ES module` format `rollup.config.js` (#259) --- rollup.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 52f7941a..d71ef483 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,9 +1,9 @@ -const fs = require('fs') -const path = require('path') -const ts = require('rollup-plugin-typescript2') -const replace = require('rollup-plugin-replace') -const alias = require('rollup-plugin-alias') -const json = require('rollup-plugin-json') +import fs from 'fs' +import path from 'path' +import ts from 'rollup-plugin-typescript2' +import replace from 'rollup-plugin-replace' +import alias from 'rollup-plugin-alias' +import json from 'rollup-plugin-json' if (!process.env.TARGET) { throw new Error('TARGET package must be specified via --environment flag.') @@ -68,7 +68,7 @@ if (process.env.NODE_ENV === 'production') { }) } -module.exports = packageConfigs +export default packageConfigs function createConfig(output, plugins = []) { const isProductionBuild =