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

Conversation

TimvdLippe
Copy link

This PR is the complement of vuejs/vue#7110 which is already being distributed on NPM for Vue. I have personally ran the build and imported in my project and I can confirm all references to process have been removed and that the code is not transpiled.

Fixes #1247

@sliekens
Copy link

This would be useful to me. I'm already using Vue's esm-browser build and waiting for plugins to catch up.

@TimvdLippe
Copy link
Author

Friendly ping on this PR.

@@ -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 ;)

@zigomir
Copy link
Contributor

zigomir commented Jan 21, 2019

@TimvdLippe nice! I wanted same thing too. Now that Vue build will ship ES modules it only makes sense we have same for vuex and vue-router.

Does your change also build minified and uglified version?

@@ -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

@Fenzland
Copy link

@zigomir @yyx990803 Is it time to merge this?
I'm trying to take out a solution with deno and vue. Need this indeed.

@zigomir
Copy link
Contributor

zigomir commented Apr 11, 2019

@Fenzland I prepared #1533 which should get you browser ready prod and dev ESM builds.

@Fenzland
Copy link

@Fenzland I prepared #1533 which should get you browser ready prod and dev ESM builds.

Thank you for your works.

@TimvdLippe
Copy link
Author

Closing as this landed in #1533

@TimvdLippe TimvdLippe closed this Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ES6 import from <script type="module"> tag inside browser
4 participants