UNPKG

@illgrenoble/ngx-remote-desktop

Version:

ngx-remote-desktop is an Angular2+ module for connecting to a remote desktop using the guacamole protocol

102 lines (100 loc) 2.53 kB
const webpack = require('webpack'); const autoprefixer = require('autoprefixer'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const { ENV, IS_PRODUCTION, APP_VERSION, IS_DEV, dir } = require('./helpers'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = function(options = {}) { return { context: dir(), resolve: { extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'], modules: [ 'node_modules', dir('src'), dir('demo') ] }, performance: { hints: false }, output: { path: dir('dist'), filename: '[name].js', sourceMapFilename: '[name].map', chunkFilename: '[id].chunk.js' }, module: { exprContextCritical: false, rules: [ { test: /\.(png|woff|woff2|eot|ttf|svg|jpeg|jpg|gif)$/, loader: 'url-loader', query: { limit: '100000' } }, { test: /\.html$/, loader: 'raw-loader' }, { test: /\.css/, use: [ ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: 'css-loader' }), { loader: 'to-string-loader' }, { loader: 'css-loader' }, { loader: 'postcss-loader' } ] }, { test: /\.scss$/, use: [ ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: 'css-loader' }), { loader: 'to-string-loader' }, { loader: 'css-loader' }, { loader: 'postcss-loader' }, { loader: 'sass-loader', options: { sourceMap: true } } ] } ] }, plugins: [ new ExtractTextPlugin('[name].css'), new webpack.NamedModulesPlugin(), new webpack.DefinePlugin({ ENV, IS_PRODUCTION, APP_VERSION, IS_DEV, HMR: options.HMR }), new CopyWebpackPlugin([ { from: 'assets', to: 'assets' } ]), new webpack.LoaderOptionsPlugin({ options: { context: dir(), tslint: { emitErrors: false, failOnHint: false, resourcePath: 'src' }, postcss: function() { return [ autoprefixer ]; } } }) ] }; };