Skip to content

Commit

Permalink
fix: json-editor build err -> (vuejs/vue-cli#7291)
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ngjie committed Oct 24, 2022
1 parent 5055a70 commit 1f032b1
Show file tree
Hide file tree
Showing 6 changed files with 619 additions and 573 deletions.
2 changes: 1 addition & 1 deletion packages/json-editor/examples/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script>
import { VueJsonEditor } from "../packages";
import { VueJsonEditor } from "../packages/index";
export default {
data() {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/json-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"core-js": "^3.6.5",
"jsoneditor": "^9.9.2",
"vue": "^2.6.11"
"vue": "2.6.10"
},
"eslintConfig": {
"root": true,
Expand All @@ -41,6 +41,6 @@
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "2.6.11"
"vue-template-compiler": "2.6.10"
}
}
2 changes: 1 addition & 1 deletion packages/json-editor/packages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</template>

<script>
import JsonEditor from "jsoneditor";
import "jsoneditor/dist/jsoneditor.min.css";
import JsonEditor from "jsoneditor/dist/jsoneditor.min.js";
export default {
name: "VueJsonEditor",
Expand Down
23 changes: 18 additions & 5 deletions packages/json-editor/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

const isProduction = process.env.NODE_ENV === "production";

module.exports = {
publicPath: './',
runtimeCompiler: true,
Expand All @@ -10,11 +12,22 @@ module.exports = {
filename: "index.html",
},
},
productionSourceMap: false,
configureWebpack: (config) => {
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
});
if (isProduction) {
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
});
// 取消webpack警告的性能提示
config.performance = {
hints: "warning",
//入口起点的最大体积
maxEntrypointSize: 50000000,
//生成文件的最大体积
maxAssetSize: 30000000,
};
}
},
}
2 changes: 1 addition & 1 deletion packages/vue-panels/src/views/interceptor/jsonEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
}
:deep(.json-editor-drawer__footer) {
position: absolute;
bottom: 10px;
bottom: 28px;
right: 40px;
z-index: 999;
}
Expand Down
Loading

0 comments on commit 1f032b1

Please sign in to comment.