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

set babel env target for dev mode with archetype v5 #1249

Merged
merged 3 commits into from
May 20, 2019

Conversation

1846689910
Copy link
Contributor

define envTargets in archetype/config/index.js
use clap dev --target=es6 or alias clap dev-es6

@1846689910 1846689910 changed the title set target for dev mode set babel env target for dev mode with archetype v5 May 18, 2019
@@ -25,7 +26,7 @@ module.exports = function(options) {
targets,
useBuiltIns: "entry",
corejs: "2",
modules: isProduction ? false : "commonjs"
modules: isProduction || (isDevelopment && target !== "default") ? false : "commonjs"
Copy link
Member

Choose a reason for hiding this comment

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

I don't get what's going on here. Could you explain it for me please?

"dev-es6": {
desc:
"Start your app with watch in development mode with webpack-dev-server with ENV_TARGET=es6",
task: ["dev-target-es6", "dev"]
Copy link
Member

Choose a reason for hiding this comment

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

task: "dev --target=es6" should work also right? No need for the extra dev-target-es6 task.

Copy link
Member

Choose a reason for hiding this comment

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

correction: task: ["dev --target=es6"]

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.

2 participants