UNPKG

@swimlane/ngx-charts

Version:

Declarative Charting Framework for Angular2 and beyond!

48 lines (45 loc) 1.09 kB
const webpack = require('webpack'); const autoprefixer = require('autoprefixer'); const { ENV, IS_PRODUCTION, IS_DEV, APP_VERSION, dir } = require('./helpers'); module.exports = function(options = {}) { return { context: dir(), resolve: { extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'], modules: [ 'node_modules', dir('src'), dir('demo') ] }, output: { path: dir('dist'), filename: '[name].js', sourceMapFilename: '[name].map', chunkFilename: '[id].chunk.js' }, plugins: [ new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ ENV, IS_PRODUCTION, APP_VERSION, IS_DEV, HMR: options.HMR }), new webpack.LoaderOptionsPlugin({ options: { context: dir(), tslint: { emitErrors: false, failOnHint: false, resourcePath: 'src' }, postcss: function() { return [ autoprefixer ]; } } }) ] }; };