summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/webpack.common.js
diff options
context:
space:
mode:
authorEinav Weiss Keidar <einavw@amdocs.com>2018-03-20 14:45:40 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-03-20 13:52:31 +0000
commit7fdf733a64670fceefc3ded35cfa581e1c458179 (patch)
treeb3623ac9a331473830cb0167c0b487f2a176427c /openecomp-ui/webpack.common.js
parentc7916a4e5955ccc5f0f5252307363b791ec5c7b9 (diff)
Adding Prettier and fixing up eslint version
Issue-ID: SDC-1094 Change-Id: Ie83ad95a03899345dd90235daf0323cbe3bc6afd Signed-off-by: Einav Weiss Keidar <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/webpack.common.js')
-rw-r--r--openecomp-ui/webpack.common.js102
1 files changed, 69 insertions, 33 deletions
diff --git a/openecomp-ui/webpack.common.js b/openecomp-ui/webpack.common.js
index d1038b6655..5506670e54 100644
--- a/openecomp-ui/webpack.common.js
+++ b/openecomp-ui/webpack.common.js
@@ -4,41 +4,77 @@ let path = require('path');
let localDevConfig = {};
try {
- localDevConfig = require('./devConfig');
+ localDevConfig = require('./devConfig');
} catch (e) {
- console.log('Could not find local dev config.');
+ console.log('Could not find local dev config.');
}
-let devConfig = Object.assign({}, require('./devConfig.defaults'), localDevConfig);
+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/en.json', // only for default build, not through gulp
- '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/, path.resolve(__dirname, '../dox-sequence-diagram/')], enforce: 'pre'},
- {test: /\.(js|jsx)$/, use: [
- {loader : 'babel-loader'},
- {loader : 'eslint-loader'}], exclude: [/node_modules/, path.resolve(__dirname, '../dox-sequence-diagram/')]},
- {test: /\.(css|scss)$/, use: [
- {loader: 'style-loader'},
- {loader: 'css-loader?sourceMap'},
- {loader: 'sass-loader?sourceMap', options: { output: { path: path.join(__dirname, 'dist') } }}]},
+ entry: devConfig.bundles,
+ resolve: {
+ modules: [path.resolve('.'), path.join(__dirname, 'node_modules')],
+ alias: {
+ i18nJson: 'nfvo-utils/i18n/en.json', // only for default build, not through gulp
+ '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/,
+ path.resolve(__dirname, '../dox-sequence-diagram/')
+ ],
+ enforce: 'pre'
+ },
+ {
+ test: /\.(js|jsx)$/,
+ use: [
+ { loader: 'babel-loader' },
+ { loader: 'eslint-loader', options: { fix: false } }
+ ],
+ exclude: [
+ /node_modules/,
+ path.resolve(__dirname, '../dox-sequence-diagram/')
+ ]
+ },
+ {
+ 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: []
+ // 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: []
};