--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clientjs/packages/dashboard-components/webpack.config.js Fri Sep 14 17:57:34 2018 +0200
@@ -0,0 +1,65 @@
+const path = require('path');
+// const nodeExternals = require('webpack-node-externals');
+const MiniCssExtractPlugin = require('mini-css-extract-plugin');
+
+module.exports = {
+ entry: path.resolve(__dirname, 'src/index.js'),
+ output: {
+ path: path.resolve(__dirname, 'lib'),
+ filename: 'dashboard-components.js',
+ library: '',
+ libraryTarget: 'commonjs2',
+ },
+ resolve: {
+ extensions: ['.wasm', '.mjs', '.js', '.json', '.jsx'],
+ },
+ // externals: [nodeExternals()],
+ target: 'web',
+ module: {
+ rules: [
+ {
+ test: /\.(js|jsx)$/,
+ enforce: 'pre',
+ exclude: /node_modules/,
+ loader: 'eslint-loader',
+ options: {
+ emitWarning: true,
+ failOnWarning: true,
+ failOnError: true,
+ },
+ },
+ {
+ test: /\.(js|jsx)$/,
+ exclude: /node_modules/,
+ loader: 'babel-loader',
+ options: {
+ presets: ['@babel/preset-env', '@babel/preset-react'],
+ plugins: ['@babel/plugin-proposal-class-properties'],
+ },
+ },
+ {
+ test: /\.s[c|a]ss$/,
+ use: ['style-loader', MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader'],
+ },
+ {
+ test: /\.(png|jpg|gif)$/i,
+ use: [
+ {
+ loader: 'url-loader',
+ options: {
+ limit: 8192,
+ },
+ },
+ ],
+ },
+ ],
+ },
+ plugins: [
+ new MiniCssExtractPlugin({
+ filename: 'dashboard-components.css',
+ }),
+ ],
+ performance: {
+ hints: false,
+ },
+};