From 15889ba7403bea8e34bac59d577e3dd3a233d502 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 25 Sep 2020 10:07:46 +0200 Subject: [PATCH] refactor: remove browser build --- package.json | 1 - rollup.config.js | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 61ac9236..3f48baea 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "2.0.0-alpha.1", "description": "Some awesome description", "main": "dist/pinia.cjs.js", - "browser": "dist/pinia.esm-browser.js", "module": "dist/pinia.esm-bundler.js", "unpkg": "dist/pinia.global.js", "jsdelivr": "dist/pinia.global.js", diff --git a/rollup.config.js b/rollup.config.js index e1d58ac4..9c18b19a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,7 +13,7 @@ function getAuthors(pkg) { const authors = new Set() if (contributors && contributors) - contributors.forEach(contributor => { + contributors.forEach((contributor) => { authors.add(contributor.name) }) if (author) authors.add(author.name) @@ -46,19 +46,19 @@ const outputConfigs = { format: `iife`, }, esm: { - file: pkg.browser, + file: pkg.module.replace('bundler', 'browser'), format: `es`, }, } const allFormats = Object.keys(outputConfigs) const packageFormats = allFormats -const packageConfigs = packageFormats.map(format => +const packageConfigs = packageFormats.map((format) => createConfig(format, outputConfigs[format]) ) // only add the production ready if we are bundling the options -packageFormats.forEach(format => { +packageFormats.forEach((format) => { if (format === 'cjs') { packageConfigs.push(createProductionConfig(format)) } else if (format === 'global') { @@ -165,7 +165,7 @@ function createReplacePlugin( } // allow inline overrides like //__RUNTIME_COMPILE__=true yarn build - Object.keys(replacements).forEach(key => { + Object.keys(replacements).forEach((key) => { if (key in process.env) { replacements[key] = process.env[key] } -- 2.47.2