Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (27 sloc) 1.25 KB

Using the DevExtreme React Integration with Webpack

Create a new Application

You can use some starter to create a new project based on Webpack.

Add DevExtreme

Follow the installation section in our Readme.

Configure Webpack Loaders for DevExtreme Stylesheets

Make sure that all the necessary extensions are processed by the corresponding loaders as described below.

Go to webpack.config.js and configure loaders for css and fonts as follows:

...
  loaders: [
    ...
    { test: /\.css$/, loader: "style-loader!css-loader" },
    { test: /\.(ttf|eot|woff)$/, loader: "file-loader?name=/[name].[ext]" }
  ]
...

Also, make sure that style-loader, css-loader and file-loader are installed into your project as npm dev dependencies.

Import DevExtreme Stylesheets

Having loaders configured, you need to import the required DevExtreme css files. Go to your main .js file and import the stylesheets as follows:

...
import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';
You can’t perform that action at this time.