angular - __webpack_require__(...) is not a function after adding a CSS to Webpack -
i have working angular 2 website, using webpack pack resources. pack pretty much(for now) generated dotnet new angular
command.
i added ressources packed, , worked fine.
but added css file of icon library in entry-vendor list of webpack.config.vendor.js
:
entry: { vendor: [ //[...all others...] 'icon-sets/icons/solid-icons/premium-solid-icons.min.css', ] },
i ran webpack: webpack --config webpack.config.vendor.js
(no errors), build , start website, directly error:
exception: call node module failed error: prerendering failed because of error: typeerror: __webpack_require__(...) not function @ object.<anonymous> (e:\my\project\clientapp\dist\main-server.js:380:50) @ __webpack_require__ (e:\my\project\clientapp\dist\main-server.js:20:30) @ object.<anonymous> (e:\my\project\clientapp\dist\main-server.js:1636:22) @ __webpack_require__ (e:\my\project\clientapp\dist\main-server.js:20:30) @ object.c (e:\my\project\clientapp\dist\main-server.js:256:18) @ __webpack_require__ (e:\my\project\clientapp\dist\main-server.js:20:30) @ object.<anonymous> (e:\my\project\clientapp\dist\main-server.js:153:23) @ __webpack_require__ (e:\my\project\clientapp\dist\main-server.js:20:30) @ object.<anonymous> (e:\my\project\clientapp\dist\main-server.js:349:20) @ __webpack_require__ (e:\my\project\clientapp\dist\main-server.js:20:30) @ e:\my\project\clientapp\dist\main-server.js:66:18 @ object.<anonymous> (e:\my\project\clientapp\dist\main-server.js:69:10) @ module._compile (module.js:571:32) @ object.module._extensions..js (module.js:580:10) @ module.load (module.js:488:32) current directory is: e:\my\project
my understanding .net tries pre-render stuffs , fails due webpack, no idea why , how fix it.
any idea?
Comments
Post a Comment