]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: remove browser build
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 25 Sep 2020 08:07:46 +0000 (10:07 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 25 Sep 2020 08:07:46 +0000 (10:07 +0200)
package.json
rollup.config.js

index 61ac9236573574814b8cad123f370f1399cc7172..3f48baea645051641ab6d0cbc6104a24e1c709bb 100644 (file)
@@ -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",
index e1d58ac47c13603d31f01af23f85adb233b1434e..9c18b19ae00cd359cf668c5ded3e7c2efc76b9d3 100644 (file)
@@ -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]
     }