Skip to content

Commit

Permalink
feat(uni-app-x harmony): 调整编译配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangyaqi committed Jan 10, 2025
1 parent 2222cb5 commit 68737c2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
44 changes: 43 additions & 1 deletion packages/uni-app-vue/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,48 @@
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": "false",
"process.env.NODE_ENV": "\"development\""
},
"external": [
"@dcloudio/uni-nvue-styler"
],
"babel": true
},
{
"input": {
"src/uvue/index.ts": [
"dist/uvue.runtime.esm.prod.js"
]
},
"output": {
"freeze": false
},
"replacements": {
"__X__": "true",
"__VUE_OPTIONS_API__": "true",
"__VUE_PROD_DEVTOOLS__": "false",
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": "false",
"process.env.NODE_ENV": "\"production\""
},
"external": [
"@dcloudio/uni-nvue-styler"
],
"babel": true
},
{
"input": {
"src/uvue/index.ts": [
"dist/uvue.runtime.harmony.esm.dev.js"
]
},
"output": {
"freeze": false
},
"replacements": {
"__X__": "true",
"__VUE_OPTIONS_API__": "true",
"__VUE_PROD_DEVTOOLS__": "false",
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": "false",
"process.env.NODE_ENV": "\"development\""
},
"importReplacements": [
{
"module": "@vue/shared",
Expand All @@ -143,7 +185,7 @@
{
"input": {
"src/uvue/index.ts": [
"dist/uvue.runtime.esm.prod.js"
"dist/uvue.runtime.harmony.esm.prod.js"
]
},
"output": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function createConfig (entryFile, output, buildOption) {
*/
const importReplacements = buildOption.importReplacements
plugins.push({
name: 'redirect-import',
name: 'replace-import',
transform (code, id) {
if (!id.endsWith('.js')) {
return
Expand Down

0 comments on commit 68737c2

Please sign in to comment.