Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add esm-browser build to dist #1401

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions build/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ const configs = {
input: resolve('src/index.esm.js'),
file: resolve('dist/vuex.esm.js'),
format: 'es'
},
'esm-browser': {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about minified version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it already minify because of env: 'production'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does, but check the actual output in the .min file

input: resolve('src/index.esm.js'),
file: resolve('dist/vuex.esm.browser.js'),
format: 'es',
env: 'production',
transpile: false
}
}

Expand All @@ -43,8 +50,7 @@ function genConfig (opts) {
plugins: [
replace({
__VERSION__: version
}),
buble()
})
]
},
output: {
Expand All @@ -61,6 +67,10 @@ function genConfig (opts) {
}))
}

if (opts.transpile !== false) {
config.input.plugins.push(buble());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no ; anywhere else ;)

}

return config
}

Expand Down