forked from plotly/dash-core-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.js
33 lines (30 loc) · 988 Bytes
/
babel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use strict';
var path = require('path');
var partial = require('webpack-partial').default;
var ROOT = process.cwd();
var SRC = path.join(ROOT, 'src');
module.exports = function (config) {
return partial(config, {
module: {
loaders: [
{test: /\.json$/, loader: 'json-loader'},
{
test: /\.js/,
include: [SRC],
/*
* Use require.resolve to get a deterministic path
* and avoid webpack's magick loader resolution
*/
loader: require.resolve('babel-loader')
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
}
]
},
alias: {
'react-dates/lib/css/_datepicker.css': path.join(ROOT, 'node_modules', 'react-dates/lib/css/_datepicker.css')
}
});
};