Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/icewind1991/files_markdown.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-01-24 17:20:27 +0300
committerRobin Appelman <robin@icewind.nl>2019-01-24 17:20:27 +0300
commit913bae057f1a0b0965620b7c1c83b58898bc9d9a (patch)
tree3295dee1935f3688661333b28dc9a4028ac5561e /webpack.config.js
parent74bedeff957955a4790ae8cdf3055fecb72aa25e (diff)
bumb dependencies
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 895f354..27fccbd 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,10 +1,8 @@
-const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
-const webpack = require('webpack');
const path = require('path');
-const ExtractTextPlugin = require("extract-text-webpack-plugin");
+const ExtractTextPlugin = require("mini-css-extract-plugin");
const CleanWebpackPlugin = require('clean-webpack-plugin');
-module.exports = {
+module.exports = (env, argv) => ({
devtool: 'source-map',
entry: "./js/editor.ts",
output: {
@@ -17,15 +15,13 @@ module.exports = {
},
plugins: [
new CleanWebpackPlugin(['build']),
- new webpack.NamedModulesPlugin(),
new ExtractTextPlugin({
filename: "styles.css",
allChunks: true
}),
- new UglifyJSPlugin({sourceMap: true})
],
module: {
- loaders: [
+ rules: [
{
test: /\.ts/,
loader: "ts-loader"
@@ -45,10 +41,12 @@ module.exports = {
},
{
test: /\.css$/,
- use: ExtractTextPlugin.extract({
- fallback: "style-loader",
- use: "css-loader"
- })
+ use: [
+ argv.mode !== 'production'
+ ? 'style-loader'
+ : ExtractTextPlugin.loader,
+ 'css-loader'
+ ]
},
{
test: /\.(png|jpg|gif|svg|woff|woff2|ttf|eot)$/,
@@ -64,4 +62,4 @@ module.exports = {
node: {
fs: 'empty'
}
-};
+});