Git Product home page Git Product logo

Comments (17)

erha19 avatar erha19 commented on May 21, 2024 1

@marekchen Try to re-install weex-toolkit or search the webpack congfig of weex-builder, it may local on ~/.xtoolkit/node_modules/weex-builder/builder/WeexBuilder.js, make sure thebabel-loader exclude config should be /node_modules(?!\/.*(weex).*)/.

from incubator-weex-ui.

tw93 avatar tw93 commented on May 21, 2024

you can see the same issus in here #33
If there is no problem, you can close this issue

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

I hava followed all the method, but it doesn't work.
It seems the weex-toolkit(weex-devtool&weex-previewer) problem.Because I run npm run build is ok.

from incubator-weex-ui.

erha19 avatar erha19 commented on May 21, 2024

@marekchen did you modify .babelrc like this https://github.com/alibaba/weex-ui#weex-toolkit

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19 yes

from incubator-weex-ui.

erha19 avatar erha19 commented on May 21, 2024

@marekchen Please show me your code on dotwe and I need more detaill of your compile log, can you provide some log with the keyword of weex-builder?

from incubator-weex-ui.

tw93 avatar tw93 commented on May 21, 2024

#33 (comment)

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

http://dotwe.org/vue/4fa67f7ab62b5ca1a22cec78c9e8a11c
@erha19

from incubator-weex-ui.

erha19 avatar erha19 commented on May 21, 2024

@marekchen It work well on my platform.

Maybe you should check your weexenvironment and babel config

$ weex -v
   v1.1.0-beta.6
 - weex-builder : v0.2.13-beta.4
 - weex-devtool : v0.3.2-beta.7
 - weex-previewer : v1.3.13-beta.9

.babelrc

{
  "presets": ["es2015", "stage-0"],
  "plugins": [
    [
      "component",
      {
        "libraryName": "weex-ui",
        "libDir": "packages"
      }
    ]
  ]
}

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

This two files are the outputs of weex src/index.vue, hope this help to you.
http://kgotmbzh-sand.droibaascdn.com/droi/kgotmbzhvdZZbRem9j0h9waEeAyhc0L7lQAAwKII/928913446013800448/index.js
http://kgotmbzh-sand.droibaascdn.com/droi/kgotmbzhvdZZbRem9j0h9waEeAyhc0L7lQAAwKII/928913476159004672/index.weex.js

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19 Thank you very much.
I try in a clean aliyun linux host,it's ok.
I will try reinstall all weex tool in my local computer.

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19 your OS is mac linux or win?

from incubator-weex-ui.

erha19 avatar erha19 commented on May 21, 2024

@marekchen mac

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19
I install the weex-toolkit in another clean windows computer,has the same error.
The main difference is thar output in windows lack of the following code.
So I think this problem only happend in windows computer.

/***/ (function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, "__esModule", {
	  value: true
	});

	var _index = __webpack_require__(10);

	Object.defineProperty(exports, 'default', {
	  enumerable: true,
	  get: function get() {
	    return _interopRequireDefault(_index).default;
	  }
	});

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

	module.exports = exports['default'];

/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

	var disposed = false
	function injectStyle (ssrContext) {
	  if (disposed) return
	  __webpack_require__(11)
	}
	var Component = __webpack_require__(7)(
	  /* script */
	  __webpack_require__(13),
	  /* template */
	  __webpack_require__(14),
	  /* styles */
	  injectStyle,
	  /* scopeId */
	  "data-v-8377fcc0",
	  /* moduleIdentifier (server only) */
	  null
	)
	Component.options.__file = "/Users/chenpei/Developer/work/visualization/xiudian1/node_modules/weex-ui/packages/wxc-minibar/index.vue"
	if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
	if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}

	/* hot reload */
	if (false) {(function () {
	  var hotAPI = require("vue-hot-reload-api")
	  hotAPI.install(require("vue"), false)
	  if (!hotAPI.compatible) return
	  module.hot.accept()
	  if (!module.hot.data) {
	    hotAPI.createRecord("data-v-8377fcc0", Component.options)
	  } else {
	    hotAPI.reload("data-v-8377fcc0", Component.options)
	  }
	  module.hot.dispose(function (data) {
	    disposed = true
	  })
	})()}

	module.exports = Component.exports


/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

	// style-loader: Adds some css to the DOM by adding a <style> tag

	// load the styles
	var content = __webpack_require__(12);
	if(typeof content === 'string') content = [[module.id, content, '']];
	if(content.locals) module.exports = content.locals;
	// add the styles to the DOM
	var update = __webpack_require__(5)("781060dc", content, false);
	// Hot Module Replacement
	if(false) {
	 // When the styles change, update the <style> tags
	 if(!content.locals) {
	   module.hot.accept("!!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/css-loader/index.js!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-8377fcc0\",\"scoped\":true,\"hasInlineConfig\":false}!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue", function() {
	     var newContent = require("!!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/css-loader/index.js!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-8377fcc0\",\"scoped\":true,\"hasInlineConfig\":false}!../../../../../../../../.nvm/versions/node/v8.5.0/lib/node_modules/weex-toolkit/node_modules/weex-previewer/node_modules/weex-builder/node_modules/vue-loader/lib/selector.js?type=styles&index=0!./index.vue");
	     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
	     update(newContent);
	   });
	 }
	 // When the module is disposed, remove the <style> tags
	 module.hot.dispose(function() { update(); });
	}

/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

	exports = module.exports = __webpack_require__(4)();
	// imports


	// module
	exports.push([module.id, "\n.wxc-minibar[data-v-8377fcc0] {\n  width: 750px;\n  height: 90px;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n  background-color: #009ff0;\n}\n.left[data-v-8377fcc0] {\n  width: 90px;\n}\n.middle-title[data-v-8377fcc0] {\n  font-size: 30px;\n  color: #ffffff;\n  height: 36px;\n  line-height: 34px;\n}\n.right[data-v-8377fcc0] {\n  width: 80px;\n}\n.left-button[data-v-8377fcc0] {\n  width: 21px;\n  height: 36px;\n  margin-left: 40px;\n}\n.right-button[data-v-8377fcc0] {\n  width: 32px;\n  height: 32px;\n  margin-right: 16px;\n}\n.right-text[data-v-8377fcc0] {\n  width: 80px;\n  margin-right: 20px;\n  font-size: 28px;\n  text-align: left;\n  color: #fff;\n}\n", ""]);

	// exports


/***/ }),
/* 13 */
/***/ (function(module, exports) {

	'use strict';

	Object.defineProperty(exports, "__esModule", {
	  value: true
	});
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//
	//

	var Navigator = weex.requireModule('navigator');
	exports.default = {
	  props: {
	    backgroundColor: {
	      type: String,
	      default: '#FFC900'
	    },
	    leftButton: {
	      type: String,
	      default: 'https://gw.alicdn.com/tfs/TB1x18VpwMPMeJjy1XdXXasrXXa-21-36.png'
	    },
	    textColor: {
	      type: String,
	      default: '#3D3D3D'
	    },
	    rightButton: {
	      type: String,
	      default: ''
	    },
	    title: {
	      type: String,
	      default: '阿里旅行'
	    },
	    rightText: {
	      type: String,
	      default: ''
	    },
	    useDefaultReturn: {
	      type: Boolean,
	      default: true
	    },
	    show: {
	      type: Boolean,
	      default: true
	    }
	  },
	  methods: {
	    leftButtonClicked: function leftButtonClicked() {
	      var self = this;
	      if (self.useDefaultReturn) {
	        Navigator.pop({}, function (e) {});
	      }
	      self.$emit('wxcMinibarLeftButtonClicked', {});
	    },
	    rightButtonClicked: function rightButtonClicked() {
	      var self = this;
	      if (self.rightText || self.rightButton) {
	        self.$emit('wxcMinibarRightButtonClicked', {});
	      }
	    }
	  }
	};
	module.exports = exports['default'];

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

	module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
	  return (_vm.show) ? _c('div', {
	    staticClass: "wxc-minibar",
	    style: ({
	      backgroundColor: _vm.backgroundColor
	    })
	  }, [_c('div', {
	    staticClass: "left",
	    on: {
	      "click": _vm.leftButtonClicked
	    }
	  }, [_c('image', {
	    staticClass: "left-button",
	    attrs: {
	      "src": _vm.leftButton
	    }
	  })]), _vm._v(" "), _c('text', {
	    staticClass: "middle-title",
	    style: ({
	      color: _vm.textColor
	    })
	  }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('div', {
	    staticClass: "right",
	    on: {
	      "click": _vm.rightButtonClicked
	    }
	  }, [(_vm.rightText) ? _c('text', {
	    staticClass: "right-text",
	    style: ({
	      color: _vm.textColor
	    })
	  }, [_vm._v(_vm._s(_vm.rightText))]) : _vm._e(), _vm._v(" "), (_vm.rightButton) ? _c('image', {
	    staticClass: "right-button",
	    attrs: {
	      "src": _vm.rightButton
	    }
	  }) : _vm._e()])]) : _vm._e()
	},staticRenderFns: []}
	module.exports.render._withStripped = true
	if (false) {
	  module.hot.accept()
	  if (module.hot.data) {
	     require("vue-hot-reload-api").rerender("data-v-8377fcc0", module.exports)
	  }
	}

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19
exclude: /node_modules(?!\/)*(weex).*)/ should be changed to
exclude: /node_modules(?!(\/|\\).*(weex).*)/
Because windows's file separator is \.

from incubator-weex-ui.

erha19 avatar erha19 commented on May 21, 2024

@marekchen thx, I got it, maybe you could create a pr to https://github.com/weexteam/weexpack-create.

from incubator-weex-ui.

marekchen avatar marekchen commented on May 21, 2024

@erha19 I have created a pr weexteam/a-builder-for-apache-weex#7

from incubator-weex-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.