blob: 5506670e543ae9d1e07061682dbd84f6ebccb706 [file] [log] [blame]
AviZi280f8012017-06-09 02:39:56 +03001'use strict';
2
3let path = require('path');
4
5let localDevConfig = {};
6try {
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +02007 localDevConfig = require('./devConfig');
talig8e9c0652017-12-20 14:30:43 +02008} catch (e) {
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +02009 console.log('Could not find local dev config.');
talig8e9c0652017-12-20 14:30:43 +020010}
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020011let devConfig = Object.assign(
12 {},
13 require('./devConfig.defaults'),
14 localDevConfig
15);
AviZi280f8012017-06-09 02:39:56 +030016module.exports = {
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020017 entry: devConfig.bundles,
18 resolve: {
19 modules: [path.resolve('.'), path.join(__dirname, 'node_modules')],
20 alias: {
21 i18nJson: 'nfvo-utils/i18n/en.json', // only for default build, not through gulp
22 'nfvo-utils': 'src/nfvo-utils',
23 'nfvo-components': 'src/nfvo-components',
24 'sdc-app': 'src/sdc-app',
25 'react-select/dist/': 'node_modules/react-select/dist/',
26 jquery: 'node_modules/restful-js/node_modules/jquery'
27 }
28 },
29 module: {
30 rules: [
31 {
32 test: /\.(js|jsx)$/,
33 loader: 'source-map-loader',
34 exclude: [
35 /node_modules/,
36 path.resolve(__dirname, '../dox-sequence-diagram/')
37 ],
38 enforce: 'pre'
39 },
40 {
41 test: /\.(js|jsx)$/,
42 use: [
43 { loader: 'babel-loader' },
44 { loader: 'eslint-loader', options: { fix: false } }
45 ],
46 exclude: [
47 /node_modules/,
48 path.resolve(__dirname, '../dox-sequence-diagram/')
49 ]
50 },
51 {
52 test: /\.(css|scss)$/,
53 use: [
54 { loader: 'style-loader' },
55 { loader: 'css-loader?sourceMap' },
56 {
57 loader: 'sass-loader?sourceMap',
58 options: {
59 output: { path: path.join(__dirname, 'dist') }
60 }
61 }
62 ]
63 },
AviZi280f8012017-06-09 02:39:56 +030064
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020065 // required for font icons
66 {
67 test: /\.(woff|woff2)(\?.*)?$/,
68 loader: 'url-loader?limit=16384&mimetype=application/font-woff'
69 },
70 { test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader' },
71 {
72 test: /\.(png|jpg|svg)(\?.*)?$/,
73 loader: 'url-loader?limit=16384',
74 exclude: path.join(__dirname, 'resources/images/svg')
75 },
76 { test: /\.html$/, use: [{ loader: 'html-loader' }] }
77 ]
78 },
79 plugins: []
AviZi280f8012017-06-09 02:39:56 +030080};