- 66
- 0
相关文件
babel.config.js
module.exports = {
presets: [
'@vue/app',
[
"env",
{
"modules": false,
"useBuiltIns": "entry"
}
],
"stage-0"
],
"plugins": [
["import", {
"libraryName": "iview",
"libraryDirectory": "src/components"
}],
["transform-runtime", {
"corejs": false,
"helpers": false,
"polyfill": false,
"regenerator": true,
"moduleName": "babel-runtime"
}]
],
"comments": false
}
package.json
{
"name": "housing_pc",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"vue": "^2.5.17",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.1.1",
"@vue/cli-service": "^3.1.4",
"axios": "^0.18.0",
"babel-plugin-import": "^1.11.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"iview": "^3.1.5",
"node-sass": "^4.10.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.17"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
main.js
import "babel-polyfill"
import Vue from 'vue'
import App from './App.vue'
import router from './router/router'
import store from './vuex/store'
// import {
// Carousel,
// CarouselItem,
// Select,
// Option,
// Input
// } from 'iview';
// import 'iview/dist/styles/iview.css';
// Vue.component('Carousel', Carousel);
// Vue.component('CarouselItem', CarouselItem);
// Vue.component('Select', Select);
// Vue.component('Option', Option);
// Vue.component('Input', Input);
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
vue -V
3.1.3
使用了iview做UI框架,但是ie会报错,
./node_modules/iview/src/utils/assist.js
SCRIPT1014: 无效字符
尝试使用babel,但是出现了
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In D:\miniapp\housing_pc\node_modules\babel-preset-stage-0\lib\index.js
at createDescriptor (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
at items.map (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
at Array.map (<anonymous>)
at createDescriptors (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at presets (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-descriptors.js:47:19)
at mergeChainOpts (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-chain.js:283:7
at buildRootChain (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\config-chain.js:90:20)
at loadPrivatePartialConfig (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\partial.js:85:55)
at Object.loadPartialConfig (D:\miniapp\housing_pc\node_modules\@babel\core\lib\config\partial.js:110:18)
at Object.<anonymous> (D:\miniapp\housing_pc\node_modules\babel-loader\lib\index.js:140:26)
at Generator.next (<anonymous>)
at asyncGeneratorStep (D:\miniapp\housing_pc\node_modules\babel-loader\lib\index.js:3:103)
at _next (D:\miniapp\housing_pc\node_modules\babel-loader\lib\index.js:5:194)
at D:\miniapp\housing_pc\node_modules\babel-loader\lib\index.js:5:364
@ multi (webpack)-dev-server/client?http://192.168.0.152:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
有没有人知道这个应该怎么解决一下?
- 共 0 条
- 全部回答
-
妙手秀才 普通会员 1楼
I apologize for the confusion. In fact, it is not possible to export objects from a plugin or preset file in any way. Preset files are typically used to define a specific style or workflow for a particular tool or application, and they do not have any direct access to the underlying code or data of the tool or application. Instead, they provide a set of rules and parameters that can be used to customize the behavior of the tool or application. While it is technically possible to write a plugin or preset that exports objects from the tool or application, it would require modifying the code or data of the tool or application to make the export operation possible. This would likely result in unexpected behavior or compatibility issues, and would not be recommended for most applications.
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部
