Skip to content

Commit db91d34

Browse files
Merge pull request #251 from Unikka/tasks/upgrade-dependencies
Fix: Downgrad webpack to version 4
2 parents d3bf677 + 6435ad3 commit db91d34

File tree

5 files changed

+918
-293
lines changed

5 files changed

+918
-293
lines changed

Resources/Public/main.min.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"sass-loader": "^10.1.0",
4343
"semantic-release": "^17.3.0",
4444
"style-loader": "^2.0.0",
45-
"terser-webpack-plugin": "^5.0.3",
46-
"webpack": "^5.10.1",
45+
"terser-webpack-plugin": "^4.2.3",
46+
"webpack": "^4.44.2",
4747
"webpack-cli": "^4.2.0"
4848
},
4949
"config": {

webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const {CleanWebpackPlugin} = require('clean-webpack-plugin')
44
const webpack = require('webpack');
55

66
const webpackConfig = {
7+
devtool: 'cheap-source-map',
78
context: __dirname,
89
entry: {
910
main: ['./Resources/Private/JavaScripts/index.js']
@@ -49,7 +50,7 @@ const webpackConfig = {
4950
};
5051

5152
if (!debug) {
52-
webpackConfig.devtool = 'cheap-source-map';
53+
webpackConfig.devtool = false;
5354
webpackConfig.optimization.minimizer.push(
5455
new TerserPlugin({
5556
terserOptions: {

webpack.styles.config.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
const debug = process.env.NODE_ENV !== 'production';
22
const TerserPlugin = require('terser-webpack-plugin');
33
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4-
const {CleanWebpackPlugin} = require('clean-webpack-plugin')
54
const webpack = require('webpack');
65

76
const webpackConfig = {
87
context: __dirname,
9-
devtool: false,
8+
devtool: 'inline-sourcemap',
109
entry: {
1110
main: ['./Resources/Private/Stylesheets/style.scss'],
1211
theme: ['./Resources/Private/Stylesheets/theme.scss']
1312
},
1413
output: {
15-
publicPath: '',
1614
path: __dirname + '/Resources/Public',
17-
filename: '[name][chunkhash].css',
15+
filename: '[name].css'
1816
},
1917
module: {
2018
rules: [
@@ -48,7 +46,7 @@ const webpackConfig = {
4846
}
4947
]
5048
},
51-
plugins: [new MiniCssExtractPlugin({ filename: '[name].css' })],
49+
plugins: [new MiniCssExtractPlugin({ filename: './[name].css' })],
5250
optimization: {
5351
minimizer: []
5452
},
@@ -58,7 +56,7 @@ const webpackConfig = {
5856
};
5957

6058
if (!debug) {
61-
webpackConfig.devtool = 'cheap-source-map';
59+
webpackConfig.devtool = false;
6260
webpackConfig.optimization.minimizer.push(
6361
new TerserPlugin({
6462
terserOptions: {

0 commit comments

Comments
 (0)