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

feat: Add vue2 package from npm/vue/v2 branch #21026

Merged
merged 20 commits into from
Apr 13, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
truncate confusing vue loader message
lmiller1990 committed Apr 13, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c6f1b62c32bb658a0121d67966c44215f5e54031
1 change: 1 addition & 0 deletions npm/vue2/package.json
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@
"@intlify/vue-i18n-loader": "1.0.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"axios": "0.19.2",
9 changes: 9 additions & 0 deletions npm/vue2/rollup.config.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import ts from 'rollup-plugin-typescript2'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import replace from '@rollup/plugin-replace'

import pkg from './package.json'

@@ -29,6 +30,14 @@ function createEntry (options) {
resolve({ preferBuiltins: true }),
commonjs(),
json(),
/**
* Vue 2 core tries to load require.resolve(`./package.json`) in the browser for the
* sole purpose of throwing an error about Vue Loader.
* Just truncate this for now for simplicity.
*/
replace({
'vueVersion && vueVersion !== packageVersion': JSON.stringify(false),
}),
],
output: {
banner,
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -7917,6 +7917,14 @@
is-module "^1.0.0"
resolve "^1.19.0"

"@rollup/plugin-replace@^2.3.1":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz#a2d539314fbc77c244858faa523012825068510a"
integrity sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==
dependencies:
"@rollup/pluginutils" "^3.1.0"
magic-string "^0.25.7"

"@rollup/plugin-typescript@^8.2.1":
version "8.2.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.1.tgz#f1a32d4030cc83432ce36a80a922280f0f0b5d44"