From: Eduardo San Martin Morote Date: Fri, 25 Sep 2020 08:07:46 +0000 (+0200) Subject: refactor: remove browser build X-Git-Tag: v2.0.0-alpha.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15889ba7403bea8e34bac59d577e3dd3a233d502;p=thirdparty%2Fvuejs%2Fpinia.git refactor: remove browser build --- 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] }