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

fix: run modern build in separate process #3477

Merged
merged 1 commit into from
Feb 20, 2019
Merged

fix: run modern build in separate process #3477

merged 1 commit into from
Feb 20, 2019

Conversation

yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Feb 20, 2019

fix #3438, #3474

Fixes modern mode issues by really running the two builds in separate processes (thus avoiding any babel preset caching issues)

@haoqunjiang haoqunjiang merged commit e0983f4 into dev Feb 20, 2019
@yyx990803
Copy link
Member Author

We need to update the test case (e.g. using async/await in main.js) to verify the content of the two builds.

@haoqunjiang
Copy link
Member

Added in 805a4ce

@fracsi
Copy link

fracsi commented Feb 25, 2019

For our project this breaks the build process. We call vue-cli-service from a subfolder through package.json (from project1 folder: ../node_modules/.bin/vue-cli-service build --modern --verbose).
This way the the Service context is set to the project subfolder, for normal build this is good, but when modern mode kicks in, the current implementation tries to find vue-cli-service runnable with PluginApi (https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/commands/build/index.js#L61) to run it as a subprocess, but fails to locate vue-cli-service.

We use the same vue deps for different projects, so the whole build and dependency graph is the same.

Our project layout:

/node_modules
/project_1
    src/...
    package.json - "build": "../node_modules/.bin/vue-cli-service build --modern"
/project_2
    src/...
    package.json - "build": "../node_modules/.bin/vue-cli-service build --modern"
package.json - with vue dependecies

Project package.json

{
  "name": "project_1",
  "private": true,
  "scripts": {
    "serve": "../node_modules/.bin/vue-cli-service serve --verbose",
    "build": "../node_modules/.bin/vue-cli-service build --modern --verbose",
    "lint": "../node_modules/.bin/vue-cli-service lint"
  },
  "vuePlugins": {
    "resolveFrom": "../"
  }
}
```

@LinusBorg LinusBorg deleted the fix-modern-mode branch February 26, 2019 19:12
AlMcKinlay pushed a commit to YMK/McDash that referenced this pull request Mar 8, 2019
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| @​vue/cli-plugin-babel | devDependencies | minor | [`3.4.1` -> `3.5.0`](https://diff.intrinsic.com/@vue/cli-plugin-babel/3.4.1/3.5.0) | [source](https://togithub.com/vuejs/vue-cli) |
| @​vue/cli-plugin-eslint | devDependencies | minor | [`3.4.1` -> `3.5.0`](https://diff.intrinsic.com/@vue/cli-plugin-eslint/3.4.1/3.5.0) | [source](https://togithub.com/vuejs/vue-cli) |
| @​vue/cli-service | devDependencies | minor | [`3.4.1` -> `3.5.0`](https://diff.intrinsic.com/@vue/cli-service/3.4.1/3.5.0) | [homepage](https://cli.vuejs.org/), [source](https://togithub.com/vuejs/vue-cli) |

---

### Release Notes

<details>
<summary>vuejs/vue-cli</summary>

### [`v3.5.0`](https://togithub.com/vuejs/vue-cli/blob/master/CHANGELOG.md#&#8203;350httpsgithubcomvuejsvue-clicomparev341v350-2019-03-08)

[Compare Source](https://togithub.com/vuejs/vue-cli/compare/v3.4.1...v3.5.0)

#### babel-preset-app

##### Bug Fixes

-   use an environment variable to determine the entry files to inject default polyfills ([#&#8203;3565](https://togithub.com/vuejs/vue-cli/issues/3565)) ([93f57ac](https://togithub.com/vuejs/vue-cli/commit/93f57ac)), closes [#&#8203;2983](https://togithub.com/vuejs/vue-cli/issues/2983)

##### Features

-   add `entryFiles` option, allowing explicit polyfill injection to specified files ([#&#8203;3470](https://togithub.com/vuejs/vue-cli/issues/3470)) ([7df0c58](https://togithub.com/vuejs/vue-cli/commit/7df0c58))

#### cli

##### Bug Fixes

-   add missing package keys to the sort array (issue [#&#8203;3509](https://togithub.com/vuejs/vue-cli/issues/3509)) ([#&#8203;3510](https://togithub.com/vuejs/vue-cli/issues/3510)) ([6e9ba9b](https://togithub.com/vuejs/vue-cli/commit/6e9ba9b))

#### cli-plugin-babel

##### Features

-   add .mjs files as transpileable files ([#&#8203;3485](https://togithub.com/vuejs/vue-cli/issues/3485)) ([8562d3e](https://togithub.com/vuejs/vue-cli/commit/8562d3e))

#### cli-plugin-e2e-nightwatch

##### Bug Fixes

-   setting env by `-e` in e2e tests ([#&#8203;3583](https://togithub.com/vuejs/vue-cli/issues/3583)) ([9aff29d](https://togithub.com/vuejs/vue-cli/commit/9aff29d))

#### cli-plugin-typescript

##### Features

-   loosen the restriction of typescript version ([#&#8203;3542](https://togithub.com/vuejs/vue-cli/issues/3542)) ([873ad84](https://togithub.com/vuejs/vue-cli/commit/873ad84))

#### cli-plugin-unit-jest

##### Bug Fixes

-   lock `[@VUE](https://togithub.com/vue)/test-utils` version as it's still in beta and may introduce breaking changes ([266090d](https://togithub.com/vuejs/vue-cli/commit/266090d))

#### cli-service

##### Bug Fixes

-   fix modern mode in monorepo by resolving in the package scope ([14b2c6e](https://togithub.com/vuejs/vue-cli/commit/14b2c6e)), closes [/github.com/vuejs/vue-cli/pull/3477#issuecomment-466926461](https://togithub.com//github.com/vuejs/vue-cli/pull/3477/issues/issuecomment-466926461)
-   **cli-service:** inspect --rules (close [#&#8203;3334](https://togithub.com/vuejs/vue-cli/issues/3334)) ([#&#8203;3378](https://togithub.com/vuejs/vue-cli/issues/3378)) ([6f93bfe](https://togithub.com/vuejs/vue-cli/commit/6f93bfe))
-   proxy should warn when array is passed. ([#&#8203;3525](https://togithub.com/vuejs/vue-cli/issues/3525)) ([bb4f349](https://togithub.com/vuejs/vue-cli/commit/bb4f349)), closes [#&#8203;3524](https://togithub.com/vuejs/vue-cli/issues/3524)

##### Features

-   allow vue.config.js to return a function ([#&#8203;3499](https://togithub.com/vuejs/vue-cli/issues/3499)) ([f5b174f](https://togithub.com/vuejs/vue-cli/commit/f5b174f)), closes [#&#8203;3213](https://togithub.com/vuejs/vue-cli/issues/3213)
-   support environment variable expansion ([#&#8203;3534](https://togithub.com/vuejs/vue-cli/issues/3534)) ([bd57f15](https://togithub.com/vuejs/vue-cli/commit/bd57f15))

#### cli-service-global

##### Features

-   warn if run instant prototyping in a project directory ([#&#8203;3508](https://togithub.com/vuejs/vue-cli/issues/3508)) ([2de215e](https://togithub.com/vuejs/vue-cli/commit/2de215e)), closes [#&#8203;2473](https://togithub.com/vuejs/vue-cli/issues/2473)

#### docs

##### Bug Fixes

-   **cli-service:** catch exception if "copy to clipboard" fails (issue [#&#8203;3476](https://togithub.com/vuejs/vue-cli/issues/3476)) ([#&#8203;3503](https://togithub.com/vuejs/vue-cli/issues/3503)) ([fec38f5](https://togithub.com/vuejs/vue-cli/commit/fec38f5))

</details>

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with "`rebase!`".

:no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#McInkay/McDash).
ZanderOlidan pushed a commit to ZanderOlidan/vue-cli-service-chalkfix that referenced this pull request Feb 5, 2024
ZanderOlidan pushed a commit to ZanderOlidan/vue-cli-service-chalkfix that referenced this pull request Feb 5, 2024
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.

Modern mode is breaking about @vue/cli-service and @vue/cli-plugin-typescript 3.4.0
3 participants