Commit db327be9 authored by cynddl's avatar cynddl
Browse files

Upgrade urlpy and webpack requirements

parent e1de8a5c
Pipeline #2793 failed with stages
from url import URL import urlpy
import re import re
URL_TRACKERS = [ URL_TRACKERS = [
...@@ -27,7 +27,7 @@ def cleanup_url(url_path, default_scheme="http"): ...@@ -27,7 +27,7 @@ def cleanup_url(url_path, default_scheme="http"):
>>> cleanup_url("ü.com/??") >>> cleanup_url("ü.com/??")
b'http://\xc3\xbc.com/' b'http://\xc3\xbc.com/'
""" """
u = URL.parse(url_path) u = urlpy.parse(url_path)
u.defrag().deparam(URL_TRACKERS).canonical().unpunycode().strip() u.defrag().deparam(URL_TRACKERS).canonical().unpunycode().strip()
if u.scheme == "": if u.scheme == "":
......
...@@ -16,3 +16,4 @@ pygments ...@@ -16,3 +16,4 @@ pygments
markdown markdown
opengraph_py3 opengraph_py3
-e git+https://github.com/mariocesar/sorl-thumbnail.git#egg=sorl-thumbnail -e git+https://github.com/mariocesar/sorl-thumbnail.git#egg=sorl-thumbnail
urlpy
\ No newline at end of file
const webpack = require('webpack'); const webpack = require('webpack');
const path = require('path'); const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = { module.exports = {
context: path.resolve(__dirname, 'static/src'), context: path.resolve(__dirname, 'static/src'),
...@@ -11,9 +12,7 @@ module.exports = { ...@@ -11,9 +12,7 @@ module.exports = {
rules: [ rules: [
{ {
test: /\.css$/, test: /\.css$/,
use: ExtractTextPlugin.extract({ use: [MiniCssExtractPlugin.loader, "css-loader"],
use: 'css-loader?importLoaders=1!postcss-loader'
}),
}, },
{ {
test: /\.(woff|woff2|ttf|eot|svg)(\?v=[a-z0-9]\.[a-z0-9]\.[a-z0-9])?$/, test: /\.(woff|woff2|ttf|eot|svg)(\?v=[a-z0-9]\.[a-z0-9]\.[a-z0-9])?$/,
...@@ -26,7 +25,9 @@ module.exports = { ...@@ -26,7 +25,9 @@ module.exports = {
filename: "./admin.min.js" filename: "./admin.min.js"
}, },
plugins: [ plugins: [
new ExtractTextPlugin('[name].bundle.css'), new MiniCssExtractPlugin({'filename': '[name].bundle.css'})
new webpack.optimize.UglifyJsPlugin({minimize: true})
], ],
optimization: {
minimizer: [new UglifyJsPlugin()],
},
}; };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment