Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"presets": [
"env",
"react",
"stage-1"
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-export-default-from"
],
"env": {
"test": {
"plugins": [
[
"__coverage__",
"istanbul",
{
"ignore": "*.test.*"
"exclude": ["**/*.test.*"]
}
]
]
Expand Down
18 changes: 10 additions & 8 deletions config/webpack-common.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
'use strict';

let ExtractTextPlugin = require('extract-text-webpack-plugin');
let ProvidePlugin = require('webpack').ProvidePlugin;
let path = require('path');
let MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: 'babel-loader',
exclude: /node_modules/
include: [
path.resolve(__dirname, '../src'),
path.resolve(__dirname, '../demo'),
path.resolve(__dirname, '../node_modules/uuid'),
],
},
{
test: /\.scss/,
use: ExtractTextPlugin.extract({
use: ['css-loader', 'sass-loader']
})
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
}
],
},
Expand All @@ -24,10 +26,10 @@ module.exports = {
},

plugins: [
new ExtractTextPlugin('query-builder.css')
new MiniCssExtractPlugin({ filename: 'query-builder.css' })
],

stats: {
maxModules: 0
modules: false
}
};
6 changes: 2 additions & 4 deletions config/webpack-dev.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

let HtmlPlugin = require('html-webpack-plugin');
const merge = require('webpack-merge');
const { merge } = require('webpack-merge');
const webpackCommon = require('./webpack-common.config');
const path = require('path');

module.exports = merge(webpackCommon, {
mode: 'development',
entry: {
demo: './demo/main.js'
},
Expand All @@ -17,9 +18,6 @@ module.exports = merge(webpackCommon, {
devtool: 'cheap-module-source-map',
devServer: {
historyApiFallback: true,
stats: {
maxModules: 0
}
},

plugins: [
Expand Down
11 changes: 6 additions & 5 deletions config/webpack-prod.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

const merge = require('webpack-merge');
const { merge } = require('webpack-merge');
const webpackCommon = require('./webpack-common.config');
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');

module.exports = merge(webpackCommon, {
mode: 'production',
entry: {
index: './src/index.js'
},
Expand All @@ -19,11 +20,11 @@ module.exports = merge(webpackCommon, {
'react-dom': 'commonjs react-dom',
},

devtool: 'none',
devtool: false,

plugins: [
new CopyPlugin([{
from: './src/query-builder.scss',
}])
new CopyPlugin({
patterns: [{ from: './src/query-builder.scss' }]
})
]
});
Loading
Loading