summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/webpack.common.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/webpack.common.js')
-rw-r--r--openecomp-ui/webpack.common.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/openecomp-ui/webpack.common.js b/openecomp-ui/webpack.common.js
new file mode 100644
index 0000000000..01f6d98b21
--- /dev/null
+++ b/openecomp-ui/webpack.common.js
@@ -0,0 +1,44 @@
+'use strict';
+
+let path = require('path');
+
+let localDevConfig = {};
+try {
+ localDevConfig = require('./devConfig');
+} catch (e) {}
+let devConfig = Object.assign({}, require('./devConfig.defaults'), localDevConfig);
+
+module.exports = {
+ entry: devConfig.bundles,
+ resolve: {
+ modules: [path.resolve('.'), path.join(__dirname, 'node_modules')],
+ alias: {
+ i18nJson: 'nfvo-utils/i18n/locale.json',
+ 'nfvo-utils': 'src/nfvo-utils',
+ 'nfvo-components': 'src/nfvo-components',
+ 'sdc-app': 'src/sdc-app',
+ 'react-select/dist/' : 'node_modules/react-select/dist/',
+ 'jquery' : 'node_modules/restful-js/node_modules/jquery'
+ }
+ },
+ module: {
+ rules: [
+ {test: /\.(js|jsx)$/, loader: 'source-map-loader', exclude: /node_modules/, enforce: 'pre'},
+ {test: /\.(js|jsx)$/, use: [
+ {loader : 'react-hot-loader'},
+ {loader : 'babel-loader'},
+ {loader : 'eslint-loader'}], exclude: /node_modules/},
+ {test: /\.(css|scss)$/, use: [
+ {loader: 'style-loader'},
+ {loader: 'css-loader?sourceMap'},
+ {loader: 'sass-loader?sourceMap', options: { output: { path: path.join(__dirname, 'dist') } }}]},
+
+ // required for font icons
+ {test: /\.(woff|woff2)(\?.*)?$/, loader: 'url-loader?limit=16384&mimetype=application/font-woff'},
+ {test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader'},
+ {test: /\.(png|jpg|svg)(\?.*)?$/, loader: 'url-loader?limit=16384', exclude: path.join(__dirname, 'resources/images/svg') },
+ {test: /\.html$/, use: [ {loader: 'html-loader'}]}
+ ]
+ },
+ plugins: []
+};