Skip to content

Commit

Permalink
refactor: remove browser build
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Sep 25, 2020
1 parent 8914475 commit 15889ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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]
}
Expand Down

0 comments on commit 15889ba

Please sign in to comment.