AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 1 | 'use strict'; |
| 2 | |
| 3 | let path = require('path'); |
| 4 | |
| 5 | let localDevConfig = {}; |
| 6 | try { |
| 7 | localDevConfig = require('./devConfig'); |
| 8 | } catch (e) {} |
| 9 | let devConfig = Object.assign({}, require('./devConfig.defaults'), localDevConfig); |
| 10 | |
| 11 | module.exports = { |
| 12 | entry: devConfig.bundles, |
| 13 | resolve: { |
| 14 | modules: [path.resolve('.'), path.join(__dirname, 'node_modules')], |
| 15 | alias: { |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame^] | 16 | i18nJson: 'nfvo-utils/i18n/en.json', // only for default build, not through gulp |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 17 | '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 | }; |