Мне было поручено обновить Modernizr до последней версии 3.5.0 для Visual Studio ASP. NET приложений через Nuget, и после установки было установлено примерно 52 файла -
Имя Файл
- addTest. js
- atRule. js
- содержит. js
- computedStyle. js
- createElement. js
- cssomPrefixes. js
- cssToDOM. js
- docElement. js
- domPrefixes. js
- domTo CSS. js
- fnBind. js
- generate. js
- getBody. js
- hasEvent. js
- hasOwnProp. js
- html5printshiv. js
- html5shiv. js
- injectElementWithStyles. js
- inputElem. js
- is. js
- isSVG. js
- load. js
- modElem. js
- Modernizr. js
- ModernizrProto. js
- mq . js
- nativeTestProps. js
- omPrefixes. js
- с префиксом. js
- с префиксом CSS. js
- с префиксом CSSValue. js
- префиксы. js
- округлые эквалайзеры. js
- setClasses. js
- slice. js
- testAllProps. js
- testDOMProps. js
- testProp. js
- testPropsAll. js
- testRunner. js
- testStyles. js
- testXhrType. js
- toStringFn. js
Это привело к созданию пакета -
//JavaScript Shared
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr/addTest.js",
"~/Scripts/modernizr/atRule.js",
"~/Scripts/modernizr/atRule.js",
"~/Scripts/modernizr/contains.js",
"~/Scripts/modernizr/computedStyle.js",
"~/Scripts/modernizr/createElement.js",
"~/Scripts/modernizr/cssomPrefixes.js",
"~/Scripts/modernizr/cssToDOM.js",
"~/Scripts/modernizr/docElement.js",
"~/Scripts/modernizr/domPrefixes.js",
"~/Scripts/modernizr/domToCSS.js",
"~/Scripts/modernizr/fnBind.js",
"~/Scripts/modernizr/generate.js",
"~/Scripts/modernizr/getBody.js",
"~/Scripts/modernizr/hasEvent.js",
"~/Scripts/modernizr/hasOwnProp.js",
"~/Scripts/modernizr/html5printshiv.js",
"~/Scripts/modernizr/html5shiv.js",
"~/Scripts/modernizr/injectElementWithStyles.js",
"~/Scripts/modernizr/inputElem.js",
"~/Scripts/modernizr/is.js",
"~/Scripts/modernizr/isSVG.js",
"~/Scripts/modernizr/load.js",
"~/Scripts/modernizr/modElem.js",
"~/Scripts/modernizr/Modernizr.js",
"~/Scripts/modernizr/ModernizrProto.js",
"~/Scripts/modernizr/mq.js",
"~/Scripts/modernizr/nativeTestProps.js",
"~/Scripts/modernizr/omPrefixes.js",
"~/Scripts/modernizr/prefixed.js",
"~/Scripts/modernizr/prefixedCSS.js",
"~/Scripts/modernizr/prefixedCSSValue.js",
"~/Scripts/modernizr/prefixes.js",
"~/Scripts/modernizr/roundedEquals.js",
"~/Scripts/modernizr/setClasses.js",
"~/Scripts/modernizr/slice.js",
"~/Scripts/modernizr/testAllProps.js",
"~/Scripts/modernizr/testDOMProps.js",
"~/Scripts/modernizr/testProp.js",
"~/Scripts/modernizr/testPropsAll.js",
"~/Scripts/modernizr/testRunner.js",
"~/Scripts/modernizr/testStyles.js",
"~/Scripts/modernizr/testXhrType.js",
"~/Scripts/modernizr/toStringFn.js"
));
at Modernizr.js:1 (anonymous) @ Modernizr.js:1
В /Views/Shared/_Layout.cshtml
Строка кода @Scripts.Render("~/bundles/modernizr")
Ошибка:
Modernizr.js:1 Uncaught ReferenceError: define is not defined
at Modernizr.js:1
(anonymous) @ Modernizr.js:1
ModernizrProto.js:1 Uncaught ReferenceError: define is not defined
at ModernizrProto.js:1
(anonymous) @ ModernizrProto.js:1
addTest.js:1 Uncaught ReferenceError: define is not defined
at addTest.js:1
(anonymous) @ addTest.js:1
atRule.js:1 Uncaught ReferenceError: define is not defined
at atRule.js:1
(anonymous) @ atRule.js:1
contains.js:1 Uncaught ReferenceError: define is not defined
at contains.js:1
(anonymous) @ contains.js:1
computedStyle.js:1 Uncaught ReferenceError: define is not defined
at computedStyle.js:1
(anonymous) @ computedStyle.js:1
createElement.js:1 Uncaught ReferenceError: define is not defined
at createElement.js:1
(anonymous) @ createElement.js:1
cssomPrefixes.js:1 Uncaught ReferenceError: define is not defined
at cssomPrefixes.js:1
(anonymous) @ cssomPrefixes.js:1
cssToDOM.js:1 Uncaught ReferenceError: define is not defined
at cssToDOM.js:1
(anonymous) @ cssToDOM.js:1
docElement.js:1 Uncaught ReferenceError: define is not defined
at docElement.js:1
(anonymous) @ docElement.js:1
domPrefixes.js:1 Uncaught ReferenceError: define is not defined
at domPrefixes.js:1
(anonymous) @ domPrefixes.js:1
domToCSS.js:1 Uncaught ReferenceError: define is not defined
at domToCSS.js:1
(anonymous) @ domToCSS.js:1
fnBind.js:1 Uncaught ReferenceError: define is not defined
at fnBind.js:1
(anonymous) @ fnBind.js:1
generate.js:1 Uncaught ReferenceError: define is not defined
at generate.js:1
(anonymous) @ generate.js:1
getBody.js:1 Uncaught ReferenceError: define is not defined
at getBody.js:1
(anonymous) @ getBody.js:1
hasEvent.js:1 Uncaught ReferenceError: define is not defined
at hasEvent.js:1
(anonymous) @ hasEvent.js:1
hasOwnProp.js:1 Uncaught ReferenceError: define is not defined
at hasOwnProp.js:1
(anonymous) @ hasOwnProp.js:1
html5printshiv.js:1 Uncaught ReferenceError: define is not defined
at html5printshiv.js:1
(anonymous) @ html5printshiv.js:1
html5shiv.js:1 Uncaught ReferenceError: define is not defined
at html5shiv.js:1
(anonymous) @ html5shiv.js:1
injectElementWithStyles.js:1 Uncaught ReferenceError: define is not defined
at injectElementWithStyles.js:1
(anonymous) @ injectElementWithStyles.js:1
inputElem.js:1 Uncaught ReferenceError: define is not defined
at inputElem.js:1
(anonymous) @ inputElem.js:1
is.js:1 Uncaught ReferenceError: define is not defined
at is.js:1
(anonymous) @ is.js:1
isSVG.js:1 Uncaught ReferenceError: define is not defined
at isSVG.js:1
(anonymous) @ isSVG.js:1
load.js:1 Uncaught ReferenceError: define is not defined
at load.js:1
(anonymous) @ load.js:1
modElem.js:1 Uncaught ReferenceError: define is not defined
at modElem.js:1
(anonymous) @ modElem.js:1
mq.js:1 Uncaught ReferenceError: define is not defined
at mq.js:1
(anonymous) @ mq.js:1
nativeTestProps.js:1 Uncaught ReferenceError: define is not defined
at nativeTestProps.js:1
(anonymous) @ nativeTestProps.js:1
omPrefixes.js:1 Uncaught ReferenceError: define is not defined
at omPrefixes.js:1
(anonymous) @ omPrefixes.js:1
prefixed.js:1 Uncaught ReferenceError: define is not defined
at prefixed.js:1
(anonymous) @ prefixed.js:1
prefixedCSS.js:1 Uncaught ReferenceError: define is not defined
at prefixedCSS.js:1
(anonymous) @ prefixedCSS.js:1
prefixedCSSValue.js:1 Uncaught ReferenceError: define is not defined
at prefixedCSSValue.js:1
(anonymous) @ prefixedCSSValue.js:1
prefixes.js:1 Uncaught ReferenceError: define is not defined
at prefixes.js:1
(anonymous) @ prefixes.js:1
roundedEquals.js:1 Uncaught ReferenceError: define is not defined
at roundedEquals.js:1
(anonymous) @ roundedEquals.js:1
setClasses.js:1 Uncaught ReferenceError: define is not defined
at setClasses.js:1
(anonymous) @ setClasses.js:1
slice.js:1 Uncaught ReferenceError: define is not defined
at slice.js:1
(anonymous) @ slice.js:1
testAllProps.js:1 Uncaught ReferenceError: define is not defined
at testAllProps.js:1
(anonymous) @ testAllProps.js:1
testDOMProps.js:1 Uncaught ReferenceError: define is not defined
at testDOMProps.js:1
(anonymous) @ testDOMProps.js:1
testProp.js:1 Uncaught ReferenceError: define is not defined
at testProp.js:1
(anonymous) @ testProp.js:1
testPropsAll.js:1 Uncaught ReferenceError: define is not defined
at testPropsAll.js:1
(anonymous) @ testPropsAll.js:1
testRunner.js:1 Uncaught ReferenceError: define is not defined
at testRunner.js:1
(anonymous) @ testRunner.js:1
testStyles.js:1 Uncaught ReferenceError: define is not defined
at testStyles.js:1
(anonymous) @ testStyles.js:1
testXhrType.js:1 Uncaught ReferenceError: define is not defined
at testXhrType.js:1
(anonymous) @ testXhrType.js:1
toStringFn.js:1 Uncaught ReferenceError: define is not defined
at toStringFn.js:1
(anonymous) @ toStringFn.js:1