blob: ebe4a8454a347a784b4a4e75711c442616fa45c2 [file] [log] [blame]
AviZi280f8012017-06-09 02:39:56 +03001'use strict';
2
3let path = require('path');
4
5let localDevConfig = {};
6try {
7 localDevConfig = require('./devConfig');
8} catch (e) {}
9let devConfig = Object.assign({}, require('./devConfig.defaults'), localDevConfig);
10
11module.exports = {
12 entry: devConfig.bundles,
13 resolve: {
14 modules: [path.resolve('.'), path.join(__dirname, 'node_modules')],
15 alias: {
Avi Zivb8e2faf2017-07-18 19:45:38 +030016 i18nJson: 'nfvo-utils/i18n/en.json', // only for default build, not through gulp
AviZi280f8012017-06-09 02:39:56 +030017 'nfvo-utils': 'src/nfvo-utils',
18 'nfvo-components': 'src/nfvo-components',
19 'sdc-app': 'src/sdc-app',
20 'react-select/dist/' : 'node_modules/react-select/dist/',
21 'jquery' : 'node_modules/restful-js/node_modules/jquery'
22 }
23 },
24 module: {
25 rules: [
26 {test: /\.(js|jsx)$/, loader: 'source-map-loader', exclude: /node_modules/, enforce: 'pre'},
27 {test: /\.(js|jsx)$/, use: [
28 {loader : 'react-hot-loader'},
29 {loader : 'babel-loader'},
30 {loader : 'eslint-loader'}], exclude: /node_modules/},
31 {test: /\.(css|scss)$/, use: [
32 {loader: 'style-loader'},
33 {loader: 'css-loader?sourceMap'},
34 {loader: 'sass-loader?sourceMap', options: { output: { path: path.join(__dirname, 'dist') } }}]},
35
36 // required for font icons
37 {test: /\.(woff|woff2)(\?.*)?$/, loader: 'url-loader?limit=16384&mimetype=application/font-woff'},
38 {test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader'},
39 {test: /\.(png|jpg|svg)(\?.*)?$/, loader: 'url-loader?limit=16384', exclude: path.join(__dirname, 'resources/images/svg') },
40 {test: /\.html$/, use: [ {loader: 'html-loader'}]}
41 ]
42 },
43 plugins: []
44};