UNPKG

stock-indicator-mapper

Version:

A function given to map on an array of objects containing daily stock EOD data.

81 lines (78 loc) 1.82 kB
const path = require('path'); const webpack = require('webpack'); const buildPath = path.resolve(__dirname, 'app'); const entry = path.resolve(__dirname, 'app', 'index.js'); module.exports = { context: __dirname, devtool: 'inline-source-map', entry: [ 'babel-polyfill', entry, ], output: { path: buildPath, filename: 'stockIndicatorMappers.js', libraryTarget: 'umd', libraryExport: 'default', library: 'stockIndicatorMappers', }, externals: { immutable: { commonjs: 'immutable', commonjs2: 'immutable', amd: 'immutable', root: 'Immutable', }, lodash: { commonjs: 'lodash', commonjs2: 'lodash', amd: 'lodash', root: '_', }, moment: { commonjs: 'moment', commonjs2: 'moment', amd: 'moment', root: 'moment', }, ramda: { commonjs: 'ramda', commonjs2: 'ramda', amd: 'ramda', root: 'R', }, regression: { commonjs: 'regression', commonjs2: 'regression', amd: 'regression', root: 'regression', }, }, resolve: { alias: { // can do import Main from Components/Main/; instead of full path App: path.resolve(__dirname, 'app'), Constants: path.resolve(__dirname, 'app', 'constants'), Utils: path.resolve(__dirname, 'app', 'utils'), Indicators: path.resolve(__dirname, 'app', 'indicators'), }, extensions: ['.js'], }, module: { loaders: [ { test: /\.jsx?$/, exclude: /(node_modules)/, loader: 'babel-loader', query: { cacheDirectory: true, presets: ['env', 'stage-1'], }, }, ], }, plugins: [ new webpack.EnvironmentPlugin({ 'process.env.NODE_ENV': JSON.stringify('development'), }), ], };