我使用/.Net命令创建了一个新的.Net核心/类型记录项目:
dotnet new aurelia这个很好用。现在我想使用这个项目的Aurelia桥插件。
奥雷利亚的.Net核心模板使用Webpack,所以我一直在尝试遵循Webpack的安装说明:http://aurelia-ui-toolkits.github.io/demo-kendo/#/installation
我已经完成了以下步骤:
npm install kendo-ui-core jquery --savenpm install aurelia-kendoui-bridge --saveentry: { vendor: [ 'aurelia-event-aggregator', 'aurelia-fetch-client', 'aurelia-framework', 'aurelia-history-browser', 'aurelia-logging-console', 'aurelia-pal-browser', 'aurelia-polyfills', 'aurelia-route-recognizer', 'aurelia-router', 'aurelia-templating-binding', 'aurelia-templating-resources', 'aurelia-templating-router', 'bootstrap', 'bootstrap/dist/css/bootstrap.css', 'jquery', 'kendo-ui-core', 'aurelia-kendoui-bridge' ], }1. Imported the kendo-ui-core and aurelia-kendoui-bridge into the boot.ts file, and added the bridge plugin as per the installation instructions. boot.ts now looks like this (apologies for the dodgy formatting - for some reason it didn't want to apply code format to the whole block):import 'isomorphic-fetch';
import { Aurelia, PLATFORM } from 'aurelia-framework';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap';
import 'kendo-ui-core';
import 'aurelia-kendoui-bridge';
declare const IS_DEV_BUILD: boolean;
export function configure(aurelia: Aurelia) { aurelia.use.standardConfiguration() .plugin(PLATFORM.moduleName('aurelia-kendoui-bridge'));
if (IS_DEV_BUILD) { aurelia.use.developmentLogging();} aurelia.start().then(() => =>)
}
然而,当我运行这个程序时,我会得到一个错误:
Uncaught ReferenceError: vendor_8b79c30b7e7439ee178d is not defined
at Object.29 (external "vendor_8b79c30…"?f61b:1)
at __webpack_require__ (bootstrap 162cab7…?2baa:657)
at fn (bootstrap 162cab7…?2baa:85)
at Object.126 (global.js from dll-reference vendor_8b79c30…?da06:1)
at __webpack_require__ (bootstrap 162cab7…?2baa:657)
at fn (bootstrap 162cab7…?2baa:85)
at Object.7 (vendor.js?v=Filp3zKgThugnEmJ0hIhP507zLguUxBsJn0jDKuyf6c:68401)
at __webpack_require__ (bootstrap 162cab7…?2baa:657)
at fn (bootstrap 162cab7…?2baa:85)
at Object.14 (aurelia-metadata.js?78b1:1)我对Webpack和剑道桥的了解是相当基础的,所以我在这里可能错过了一些明显的步骤。有没有人知道我可能做错了什么,有没有人用奥雷利亚.Net核心项目成功地获得了奥雷利亚·肯多桥?
发布于 2017-10-30 09:58:22
这不再是一个问题。按照上述最初问题中的步骤,现在将产生一个工作项目。
发布于 2017-09-24 02:04:57
有一个vendor-manifest.json文件,webpack用它从app包中引用供应商模块。您的错误意味着此清单与从供应商包导出的内容不匹配
第一对来自我的供应商包的线上
var vendor_8b79c30b7e7439ee178d =
/******/ (function(modules) { // webpackBootstrap
...我的名单开始了
{"name":"vendor_8b79c30b7e7439ee178d",名字里有匹配的。
重新构建供应商包,然后再重新构建应用程序包,应该可以解决这个问题。
webpack --config webpack.config.vendor.js
webpack --config webpack.config.js此外,aurelia模板有一个非常重要的错误,它阻止了供应商包的可重用性。确保您查看这个公关以获得修复。
https://stackoverflow.com/questions/44258133
复制相似问题