I am trying to create a Angular 2 SPA application based on the ASPNETCORE-SPA template inside Visual Studio 2015.
I am also trying to utilise the commerical DevExtreme widgets from DevExpress.
I have managed to create the widget in the HTML but the CSS is not getting applied and I suspect that it is because I am not including the CSS correctly in the webpack configurations and not loading it correctly in the HTML / CSHTML files.
I am new to these technologies and after looking around webpack, have been unable to get the CSS to work correctly.
So far I have added the lines:
import '../node_modules/devextreme/dist/css/dx.common.css';
import '../node_modules/devextreme/dist/css/dx.light.css';
import '../node_modules/devextreme/dist/css/dx.spa.css';
into my main.ts file as this is the file in the entry point for the webpack.config:
entry: {
'main': './Client/main.ts'
},
and I have added the css rule to the webpack.config.js file:
{ test: /\.css$/, loader: extractCSS.extract(['css']) },
but I get an error:
Error: Module 'e:\sources\angular2-3\Application\Error: Module 'e:\sources\angular2-3\Application\node_modules\css\index.js' is not a loader (must have normal or pitch function).
I am then referencing the button with the following:
<dx-button text="some text"></dx-button>
Can anybody give me any pointers as to where I am going wrong?
Is there any way on seeing whether the CSS is packed correctly?