alibaba / weex

A framework for building Mobile cross-platform UI
https://weexapp.com/
Apache License 2.0
18.28k stars 2.13k forks source link

npm build 之后报错 #2653

Closed TeemoPeng closed 3 years ago

TeemoPeng commented 7 years ago

从github上下载v-0.10.0 项目,完了之后npm install ,再npm run build ,报Template block is require 这个错误 ![Uploading 12354.png…]()

[0] ./examples/web-entry/vue/style/style-item.js?entry=true 85 bytes {29} [built] [1 error] [0] ./examples/web-entry/vue/syntax/hello-world.js?entry=true 87 bytes {30} [built] [1 error] [0] ./examples/web-entry/vue/syntax/hello-world-1.js?entry=true 89 bytes {31} [built] [1 error] [0] ./examples/web-entry/vue/animation.js?entry=true 75 bytes {0} [built] [1 error] [0] ./examples/web-entry/vue/syntax/hello-world-3.js?entry=true 89 bytes {33} [built] [1 error] [0] ./examples/web-entry/vue/syntax/hello-world-4.js?entry=true 89 bytes {34} [built] [1 error] [0] ./examples/web-entry/vue/syntax/hello-world-5.js?entry=true 89 bytes {35} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-component.js?entry=true 92 bytes {36} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-data.js?entry=true 87 bytes {37} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-events.js?entry=true 89 bytes {38} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-instance.js?entry=true 91 bytes {39} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-lifecycle.js?entry=true 92 bytes {40} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-module.js?entry=true 89 bytes {41} [built] [1 error] [0] ./examples/web-entry/vue/syntax/script-options.js?entry=true 90 bytes {42} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-class.js?entry=true 90 bytes {43} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-content.js?entry=true 92 bytes {44} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-event.js?entry=true 90 bytes {45} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-if.js?entry=true 87 bytes {46} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-repeat.js?entry=true 91 bytes {47} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-repeat-update.js?entry=true 98 bytes {48} [built] [1 error] [0] ./examples/web-entry/vue/syntax/template-style.js?entry=true 90 bytes {49} [built] [1 error] [0] ./examples/web-entry/vue/template.js?entry=true 74 bytes {50} [built] [1 error]

ERROR in ./examples/web-entry/vue/animation.js?entry=true Module not found: Error: Cannot resolve module '.... ueanimation.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue @ ./examples/web-entry/vue/animation.js?entry=true 1:10-44

ERROR in ./examples/web-entry/vue/hello.js?entry=true Module not found: Error: Cannot resolve module '.... uehello.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue @ ./examples/web-entry/vue/hello.js?entry=true 1:10-40

ERROR in ./examples/web-entry/vue/iconfont.js?entry=true Module not found: Error: Cannot resolve module '.... ueiconfont.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue @ ./examples/web-entry/vue/iconfont.js?entry=true 1:10-43

ERROR in ./examples/web-entry/vue?entry=true Module not found: Error: Cannot resolve module '.... ueindex.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue @ ./examples/web-entry/vue?entry=true 1:10-40

ERROR in ./examples/web-entry/vue/template.js?entry=true Module not found: Error: Cannot resolve module '.... ue emplate.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue @ ./examples/web-entry/vue/template.js?entry=true 1:10-43

ERROR in ./examples/web-entry/vue/components/a.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsa.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/a.js?entry=true 1:10-50

ERROR in ./examples/web-entry/vue/components/countdown.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentscountdown.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/countdown.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/components/list.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentslist.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/list.js?entry=true 1:10-53

ERROR in ./examples/web-entry/vue/components/input.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsinput.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/input.js?entry=true 1:10-54

ERROR in ./examples/web-entry/vue/components/navigator.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponents avigator.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/navigator.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/components/image.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsimage.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/image.js?entry=true 1:10-54

ERROR in ./examples/web-entry/vue/components/slider.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsslider.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/slider.js?entry=true 1:10-55

ERROR in ./examples/web-entry/vue/components/marquee.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsmarquee.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/marquee.js?entry=true 1:10-56

ERROR in ./examples/web-entry/vue/components/scroller.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsscroller.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/scroller.js?entry=true 1:10-57

ERROR in ./examples/web-entry/vue/components/text.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponents ext.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/text.js?entry=true 1:10-53

ERROR in ./examples/web-entry/vue/components/tabbar.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponents abbar.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/tabbar.js?entry=true 1:10-55

ERROR in ./examples/web-entry/vue/components/video.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponents ideo.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/video.js?entry=true 1:10-54

ERROR in ./examples/web-entry/vue/components/web.js?entry=true Module not found: Error: Cannot resolve module '...... uecomponentsweb.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\components @ ./examples/web-entry/vue/components/web.js?entry=true 1:10-52

ERROR in ./examples/web-entry/vue/modules/instance-api.js?entry=true Module not found: Error: Cannot resolve module '...... uemodulesinstance-api.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\modules @ ./examples/web-entry/vue/modules/instance-api.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/modules/clipboard.js?entry=true Module not found: Error: Cannot resolve module '...... uemodulesclipboard.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\modules @ ./examples/web-entry/vue/modules/clipboard.js?entry=true 1:10-55

ERROR in ./examples/web-entry/vue/modules/modal.js?entry=true Module not found: Error: Cannot resolve module '...... uemodulesmodal.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\modules @ ./examples/web-entry/vue/modules/modal.js?entry=true 1:10-51

ERROR in ./examples/web-entry/vue/modules/storage.js?entry=true Module not found: Error: Cannot resolve module '...... uemodulesstorage.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\modules @ ./examples/web-entry/vue/modules/storage.js?entry=true 1:10-53

ERROR in ./examples/web-entry/vue/modules/stream.js?entry=true Module not found: Error: Cannot resolve module '...... uemodulesstream.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\modules @ ./examples/web-entry/vue/modules/stream.js?entry=true 1:10-52

ERROR in ./examples/web-entry/vue/showcase/calculator.js?entry=true Module not found: Error: Cannot resolve module '...... ueshowcasecalculator.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\showcase @ ./examples/web-entry/vue/showcase/calculator.js?entry=true 1:10-57

ERROR in ./examples/web-entry/vue/showcase/itemlist.js?entry=true Module not found: Error: Cannot resolve module '...... ueshowcaseitemlist.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\showcase @ ./examples/web-entry/vue/showcase/itemlist.js?entry=true 1:10-55

ERROR in ./examples/web-entry/vue/showcase/progress.js?entry=true Module not found: Error: Cannot resolve module '...... ueshowcaseprogress.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\showcase @ ./examples/web-entry/vue/showcase/progress.js?entry=true 1:10-55

ERROR in ./examples/web-entry/vue/showcase/new-fashion.js?entry=true Module not found: Error: Cannot resolve module '...... ueshowcase ew-fashion.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\showcase @ ./examples/web-entry/vue/showcase/new-fashion.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/style?entry=true Module not found: Error: Cannot resolve module '...... uestyleindex.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\style @ ./examples/web-entry/vue/style?entry=true 1:10-49

ERROR in ./examples/web-entry/vue/style/style-box.js?entry=true Module not found: Error: Cannot resolve module '...... uestylestyle-box.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\style @ ./examples/web-entry/vue/style/style-box.js?entry=true 1:10-53

ERROR in ./examples/web-entry/vue/style/style-flex.js?entry=true Module not found: Error: Cannot resolve module '...... uestylestyle-flex.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\style @ ./examples/web-entry/vue/style/style-flex.js?entry=true 1:10-54

ERROR in ./examples/web-entry/vue/style/style-item.js?entry=true Module not found: Error: Cannot resolve module '...... uestylestyle-item.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\style @ ./examples/web-entry/vue/style/style-item.js?entry=true 1:10-54

ERROR in ./examples/web-entry/vue/syntax/hello-world-1.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world-1.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world-1.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/hello-world-2.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world-2.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world-2.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/hello-world-3.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world-3.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world-3.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/hello-world-4.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world-4.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world-4.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/hello-world-5.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world-5.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world-5.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/hello-world.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxhello-world.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/hello-world.js?entry=true 1:10-56

ERROR in ./examples/web-entry/vue/syntax/script-data.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-data.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-data.js?entry=true 1:10-56

ERROR in ./examples/web-entry/vue/syntax/script-component.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-component.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-component.js?entry=true 1:10-61

ERROR in ./examples/web-entry/vue/syntax/script-events.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-events.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-events.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/script-instance.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-instance.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-instance.js?entry=true 1:10-60

ERROR in ./examples/web-entry/vue/syntax/script-lifecycle.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-lifecycle.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-lifecycle.js?entry=true 1:10-61

ERROR in ./examples/web-entry/vue/syntax/script-options.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-options.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-options.js?entry=true 1:10-59

ERROR in ./examples/web-entry/vue/syntax/script-module.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntaxscript-module.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/script-module.js?entry=true 1:10-58

ERROR in ./examples/web-entry/vue/syntax/template-class.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-class.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-class.js?entry=true 1:10-59

ERROR in ./examples/web-entry/vue/syntax/template-content.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-content.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-content.js?entry=true 1:10-61

ERROR in ./examples/web-entry/vue/syntax/template-repeat-update.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-repeat-update.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-repeat-update.js?entry=true 1:10-67

ERROR in ./examples/web-entry/vue/syntax/template-event.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-event.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-event.js?entry=true 1:10-59

ERROR in ./examples/web-entry/vue/syntax/template-if.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-if.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-if.js?entry=true 1:10-56

ERROR in ./examples/web-entry/vue/syntax/template-repeat.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-repeat.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-repeat.js?entry=true 1:10-60

ERROR in ./examples/web-entry/vue/syntax/template-style.js?entry=true Module not found: Error: Cannot resolve module '...... uesyntax emplate-style.vue' in E:\weex\v0.10.0\weex-dev\examples\web-entry\vue\syntax @ ./examples/web-entry/vue/syntax/template-style.js?entry=true 1:10-59

weex@0.4.0 build:test E:\weex\v0.10.0\weex-dev webpack --config build/webpack.test.config.js

Hash: 25880e2ff72223a2c7fa Version: webpack 1.14.0 Time: 954ms Asset Size Chunks Chunk Names test\build\pages\components\input.js 1.39 kB 0 [emitted] test\build\pages\components\input test\build\pages\index.js 3.42 kB 1 [emitted] test\build\pages\index

ERROR in ./test/pages/components/input.we?entry=true Template block is required

E:\weex\v0.10.0\weex-dev>

sjbwylbs commented 7 years ago

请贴完整日志

hphua commented 7 years ago

贴出完整的package.json和webpack.config.js

ghost commented 7 years ago

/* package.json ***/ { "name": "weex", "version": "0.4.0", "subversion": { "browser": "0.5.0", "framework": "0.19.8", "transformer": ">=0.1.5 <0.5" }, "description": "A framework for building Mobile cross-platform UI", "license": "Apache-2.0", "repository": { "type": "git", "url": "git@github.com:alibaba/weex.git" }, "homepage": "http://alibaba.github.io/weex/", "bugs": { "url": "https://github.com/alibaba/weex/issues" }, "private": true, "keywords": [ "weex", "hybrid", "webcomponent", "appframework", "mvvm", "javascript", "webkit", "v8", "jscore", "html5", "android", "ios", "yunos" ], "engines": { "node": ">=4" }, "scripts": { "postinstall": "bash ./bin/install-hooks.sh", "build:native": "node build/build.js native", "build:runtime": "node build/build.js runtime", "build:browser": "wwp && node build/build.js browser", "build:browser:common": "rollup -c build/rollup.browser.common.config.js", "build:vue": "node build/build.js vue", "build:examples": "npm run build:examples:native && npm run build:examples:web", "build:examples:native": "webpack --config build/webpack.examples.config.js", "build:examples:web": "webpack --config build/webpack.examples.web.config.js", "build:test": "webpack --config build/webpack.test.config.js", "build:ui-test": "webpack --config build/webpack.macacatest.config.js", "build": "npm run build:native && npm run build:browser && npm run build:vue && npm run build:examples && npm run build:test", "dist:browser": "npm run build:browser && npm run build:browser:common && bash ./bin/dist-browser.sh", "dist": "npm run dist:browser", "dev:native": "node build/build.js native --watch", "dev:runtime": "node build/build.js runtime --watch", "dev:browser": "wwp && node build/build.js native --watch", "dev:vue": "node build/build.js vue --watch", "dev:examples": "webpack --watch --config build/webpack.examples.config.js", "dev:examples:web": "webpack --watch --config build/webpack.examples.web.config.js", "dev:test": "webpack --watch --config build/webpack.test.config.js", "lint": "eslint html5", "test:case": "mocha --require reify html5/test/case/tester.js", "test:vue": "karma start build/karma.vue.conf.js", "test:unit": "mocha --require reify html5/test/unit//.js html5/test/unit///.js", "test": "npm run lint && npm run test:unit && npm run test:case", "test:cover-html": "babel-istanbul cover --report html node_modules/mocha/bin/_mocha -- --require reify --reporter dot html5/test/unit//.js html5/test/unit///.js && open coverage/index.html", "test:cover": "babel-istanbul cover --report text node_modules/mocha/bin/_mocha -- --require reify --reporter dot html5/test/unit//.js html5/test/unit///.js", "test:e2e": "npm run build:browser && node html5/test/e2e/runner.js", "serve": "serve ./ -p 12580", "serve:ui-test": "serve ./test/build/ -p 12581", "clean:examples": "echo \"\033[36;1m[Clean]\033[0m \033[33mexamples\033[0m\" && rm -vrf examples/build/", "clean:test": "echo \"\033[36;1m[Clean]\033[0m \033[33mtest\033[0m\" && rm -vrf test/build/", "clean": "npm run clean:examples && npm run clean:test", "copy:js": "cp -vf ./dist/native.js ./android/sdk/assets/main.js", "copy:examples": "rm -rf ./android/playground/app/src/main/assets/ && cp -vrf ./examples/build/* ./android/playground/app/src/main/assets/", "copy": "npm run copy:js && npm run copy:examples" }, "dependencies": { "animationjs": "^0.1.5", "core-js": "^2.4.0", "cubicbezier": "^0.1.1", "envd": "^0.1.1", "httpurl": "^0.1.1", "lazyimg": "^0.1.5", "modals": "^0.1.6", "query-string": "^4.2.3", "scroll-to": "0.0.2", "semver": "^5.1.0", "weex-components": "^0.2.0", "weex-picker": "^0.1.0", "weex-rax-framework": "0.1.7", "weex-vue-framework": "2.1.8-weex.1" }, "devDependencies": { "babel-core": "^6.17.0", "babel-istanbul": "^0.11.0", "babel-loader": "^6.2.5", "babel-plugin-coverage": "^1.0.0", "babel-preset-es2015": "^6.16.0", "babel-runtime": "^6.11.6", "chai": "^3.5.0", "chromedriver": "^2.21.2", "cross-spawn": "^4.0.0", "css-loader": "^0.26.1", "eslint": "^2.11.1", "fs-extra": "^2.0.0", "http-server": "^0.9.0", "json-loader": "^0.5.4", "karma": "^1.3.0", "karma-coverage": "^1.1.1", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.1", "karma-phantomjs-launcher": "^1.0.2", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.8.0", "macaca-cli": "^1.1.0", "macaca-utils": "^0.1.9", "mocha": "^2.5.3", "nightwatch": "^0.9.4", "phantomjs-prebuilt": "^2.1.7", "reify": "^0.3.8", "rollup": "^0.36.0", "rollup-plugin-buble": "^0.14.0", "rollup-plugin-commonjs": "^5.0.4", "rollup-plugin-eslint": "^3.0.0", "rollup-plugin-json": "^2.0.2", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-postcss": "^0.2.0", "rollup-plugin-replace": "^1.1.1", "rollup-plugin-uglify": "^1.0.1", "rollup-watch": "^2.5.0", "selenium-server": "2.53.1", "serve": "^1.4.0", "sinon": "^1.17.4", "sinon-chai": "^2.8.0", "uglify-js": "^2.6.4", "vue": "^2.1.10", "vue-loader": "^10.0.1", "vue-template-compiler": "^2.1.10", "webdriver-client": "~1.0.0", "webpack": "^1.13.1", "weex-components": "^0.2.0", "weex-loader": "^0.4.0", "weex-vdom-tester": "^0.2.0", "wwp": "^0.3.5", "xml2map": "^1.0.2" } }

/** webpack.examples.config.js *****/ var path = require('path'); var fs = require('fs'); var webpack = require('webpack');

var entry = {}; var bannerExcludeFiles = [];

function walk(dir) { dir = dir || '.' var directory = path.join(__dirname, '../examples', dir); fs.readdirSync(directory) .forEach(function(file) { var fullpath = path.join(directory, file); var stat = fs.statSync(fullpath); var extname = path.extname(fullpath); if (stat.isFile() && (extname === '.we' || extname === '.vue')) { var name = path.join('examples', 'build', dir, path.basename(file, extname)); entry[name] = fullpath + '?entry=true'; if (extname === '.we') { bannerExcludeFiles.push(name + '.js') } } else if (stat.isDirectory() && file !== 'build' && file !== 'include') { var subdir = path.join(dir, file); walk(subdir); } }); }

walk();

var banner = '// { "framework": "Vue" }\n'

var bannerPlugin = new webpack.BannerPlugin(banner, { raw: true, exclude: bannerExcludeFiles })

module.exports = { entry: entry, output : { path: '.', filename: '[name].js' }, module: { loaders: [ { test: /.(we|vue)(\?[^?]+)?$/, loader: 'weex' } ] }, plugins: [bannerPlugin] }

zhoukekestar commented 7 years ago

解决方案:http://zhoukekestar.github.io/notes/2017/04/13/weex-bugs-on-windows.html

zhoukekestar commented 7 years ago

This solution will be better.

var entry = {}; var bannerExcludeFiles = []; var webSrcDirectory = path.join(__dirname, '../examples/web-entry');

function getEntryFileContent (entryPath, vueFilePath) { // slash relativePath for windows const relativePath = slash(path.relative(path.join(entryPath, '../'), vueFilePath)); return 'var App = require(\'' + relativePath + '\')\n'

YorkShen commented 5 years ago

This PR/issue doesn't received response since Weex migrated to Apache two years ago and this repository is no longer active yet.

Feel free to ask question in new repository and thanks for your contribution.

Hanks10100 commented 3 years ago

This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.