Skip to content

Commit 448eb6a

Browse files
authored
fix: cannot resolve deps in webpack (#211)
1 parent e10e0ee commit 448eb6a

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"@docsearch/css": "^1.0.0-alpha.28",
3232
"@docsearch/js": "^1.0.0-alpha.28",
3333
"@microsoft/api-extractor": "^7.9.22",
34-
"@rollup/plugin-commonjs": "^17.0.0",
34+
"@rollup/plugin-commonjs": "^16.0.0",
3535
"@rollup/plugin-json": "^4.0.0",
36-
"@rollup/plugin-node-resolve": "^11.0.0",
36+
"@rollup/plugin-node-resolve": "^10.0.0",
3737
"@rollup/plugin-replace": "^2.3.3",
3838
"@textlint-rule/textlint-rule-no-unmatched-pair": "^1.0.7",
3939
"@types/jest": "^26.0.14",

rollup.config.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ function createConfig(format, output, plugins = []) {
6262
output.sourcemap = !!process.env.SOURCE_MAP
6363
output.banner = banner
6464
output.externalLiveBindings = false
65+
output.globals = {
66+
vue: 'Vue',
67+
'@vue/devtools-api': 'VueDevtoolsApi'
68+
}
6569

6670
const isProductionBuild =
6771
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
@@ -94,11 +98,6 @@ function createConfig(format, output, plugins = []) {
9498
}
9599
})
96100

97-
output.globals = {
98-
vue: 'Vue'
99-
// '@vue/devtools-api': 'VueDevtoolsApi'
100-
}
101-
102101
// we only need to check TS and generate declarations once for each build.
103102
// it also seems to run into weird issues when checking multiple times
104103
// during a single build.

yarn.lock

+9-24
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,10 @@
875875
magic-string "^0.25.7"
876876
resolve "^1.17.0"
877877

878-
"@rollup/plugin-commonjs@^17.0.0":
879-
version "17.0.0"
880-
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz#2ae2228354cf0fbba6cf9f06f30b2c66a974324c"
881-
integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA==
878+
"@rollup/plugin-commonjs@^16.0.0":
879+
version "16.0.0"
880+
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f"
881+
integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw==
882882
dependencies:
883883
"@rollup/pluginutils" "^3.1.0"
884884
commondir "^1.0.1"
@@ -895,17 +895,17 @@
895895
dependencies:
896896
"@rollup/pluginutils" "^3.0.8"
897897

898-
"@rollup/plugin-node-resolve@^11.0.0":
899-
version "11.0.0"
900-
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.0.tgz#770458fb26691a686c5f29f37dded94832ffce59"
901-
integrity sha512-8Hrmwjn1pLYjUxcv7U7IPP0qfnzEJWHyHE6CaZ8jbLM+8axaarJRB1jB6JgKTDp5gNga+TpsgX6F8iuvgOerKQ==
898+
"@rollup/plugin-node-resolve@^10.0.0":
899+
version "10.0.0"
900+
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-10.0.0.tgz#44064a2b98df7530e66acf8941ff262fc9b4ead8"
901+
integrity sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A==
902902
dependencies:
903903
"@rollup/pluginutils" "^3.1.0"
904904
"@types/resolve" "1.17.1"
905905
builtin-modules "^3.1.0"
906906
deepmerge "^4.2.2"
907907
is-module "^1.0.0"
908-
resolve "^1.19.0"
908+
resolve "^1.17.0"
909909

910910
"@rollup/plugin-node-resolve@^9.0.0":
911911
version "9.0.0"
@@ -5321,13 +5321,6 @@ is-core-module@^2.0.0:
53215321
dependencies:
53225322
has "^1.0.3"
53235323

5324-
is-core-module@^2.1.0:
5325-
version "2.2.0"
5326-
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
5327-
integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
5328-
dependencies:
5329-
has "^1.0.3"
5330-
53315324
is-data-descriptor@^0.1.4:
53325325
version "0.1.4"
53335326
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -8707,14 +8700,6 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.17.
87078700
is-core-module "^2.0.0"
87088701
path-parse "^1.0.6"
87098702

8710-
resolve@^1.19.0:
8711-
version "1.19.0"
8712-
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
8713-
integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
8714-
dependencies:
8715-
is-core-module "^2.1.0"
8716-
path-parse "^1.0.6"
8717-
87188703
resolve@~1.12.0:
87198704
version "1.12.3"
87208705
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.3.tgz#96d5253df8005ce19795c14338f2a013c38a8c15"

0 commit comments

Comments
 (0)