Skip to content

Commit

Permalink
fix(build): add Symbol.toStringTag when ssr build es module into cj…
Browse files Browse the repository at this point in the history
…s chunk (#951)

fix #764
  • Loading branch information
underfin committed Oct 25, 2020
1 parent 05cecaf commit 344a86a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -90,7 +90,7 @@
"postcss-import": "^12.0.1",
"postcss-load-config": "^2.1.0",
"resolve": "^1.17.0",
"rollup": "^2.26.11",
"rollup": "^2.32.1",
"rollup-plugin-dynamic-import-variables": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^6.0.0-beta.10",
Expand Down
4 changes: 3 additions & 1 deletion src/node/build/index.ts
Expand Up @@ -553,7 +553,9 @@ export async function ssrBuild(options: BuildConfig): Promise<BuildResult> {
...rollupOutputOptions,
format: 'cjs',
exports: 'named',
entryFileNames: '[name].js'
entryFileNames: '[name].js',
// 764 add `Symbol.toStringTag` when build es module into cjs chunk
namespaceToStringTag: true
},
emitIndex: false,
emitAssets: false,
Expand Down
15 changes: 4 additions & 11 deletions yarn.lock
Expand Up @@ -2349,13 +2349,6 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
dependencies:
once "^1.4.0"

enquirer@^2.3.6:
version "2.3.6"
resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
dependencies:
ansi-colors "^4.1.1"

enquirer@^2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
Expand Down Expand Up @@ -5897,10 +5890,10 @@ rollup-pluginutils@^2.8.2:
dependencies:
estree-walker "^0.6.1"

rollup@^2.26.11:
version "2.26.11"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.26.11.tgz#4fc31de9c7b83d50916fc8395f8c3d24730cdaae"
integrity sha512-xyfxxhsE6hW57xhfL1I+ixH8l2bdoIMaAecdQiWF3N7IgJEMu99JG+daBiSZQjnBpzFxa0/xZm+3pbCdAQehHw==
rollup@^2.32.1:
version "2.32.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.32.1.tgz#625a92c54f5b4d28ada12d618641491d4dbb548c"
integrity sha512-Op2vWTpvK7t6/Qnm1TTh7VjEZZkN8RWgf0DHbkKzQBwNf748YhXbozHVefqpPp/Fuyk/PQPAnYsBxAEtlMvpUw==
optionalDependencies:
fsevents "~2.1.2"

Expand Down

0 comments on commit 344a86a

Please sign in to comment.