Skip to content

Commit 15889ba

Browse files
committed
refactor: remove browser build
1 parent 8914475 commit 15889ba

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "2.0.0-alpha.1",
44
"description": "Some awesome description",
55
"main": "dist/pinia.cjs.js",
6-
"browser": "dist/pinia.esm-browser.js",
76
"module": "dist/pinia.esm-bundler.js",
87
"unpkg": "dist/pinia.global.js",
98
"jsdelivr": "dist/pinia.global.js",

rollup.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function getAuthors(pkg) {
1313

1414
const authors = new Set()
1515
if (contributors && contributors)
16-
contributors.forEach(contributor => {
16+
contributors.forEach((contributor) => {
1717
authors.add(contributor.name)
1818
})
1919
if (author) authors.add(author.name)
@@ -46,19 +46,19 @@ const outputConfigs = {
4646
format: `iife`,
4747
},
4848
esm: {
49-
file: pkg.browser,
49+
file: pkg.module.replace('bundler', 'browser'),
5050
format: `es`,
5151
},
5252
}
5353

5454
const allFormats = Object.keys(outputConfigs)
5555
const packageFormats = allFormats
56-
const packageConfigs = packageFormats.map(format =>
56+
const packageConfigs = packageFormats.map((format) =>
5757
createConfig(format, outputConfigs[format])
5858
)
5959

6060
// only add the production ready if we are bundling the options
61-
packageFormats.forEach(format => {
61+
packageFormats.forEach((format) => {
6262
if (format === 'cjs') {
6363
packageConfigs.push(createProductionConfig(format))
6464
} else if (format === 'global') {
@@ -165,7 +165,7 @@ function createReplacePlugin(
165165
}
166166
// allow inline overrides like
167167
//__RUNTIME_COMPILE__=true yarn build
168-
Object.keys(replacements).forEach(key => {
168+
Object.keys(replacements).forEach((key) => {
169169
if (key in process.env) {
170170
replacements[key] = process.env[key]
171171
}

0 commit comments

Comments
 (0)