Skip to content

Commit

Permalink
build: use webpack 5 (katspaugh#2093)
Browse files Browse the repository at this point in the history
* update dev dependencies

* enable deprecation warnings stacktrace

* remove obsolete terser plugin options

* enable colors

* use karma-webpack next

* update changelog
  • Loading branch information
thijstriemstra committed Dec 13, 2020
1 parent 32fea4e commit b234794
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
wavesurfer.js changelog
=======================

x.x.x (unreleased)
------------------

- Use Webpack 5 for build (#2093)

4.3.0 (12.12.2020)
------------------

Expand Down
6 changes: 6 additions & 0 deletions build-config/fragments/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const datefns = require('date-fns');
const rootDir = path.resolve(__dirname, '..', '..');
const pckg = require(path.join(rootDir, 'package.json'));

// enable logging of deprecation warnings stacktrace
process.traceDeprecation = true;

// inject JS version number
const jsVersionPlugin = new webpack.DefinePlugin({
__VERSION__: JSON.stringify(pckg.version)
Expand All @@ -23,6 +26,9 @@ module.exports = {
performance: {
hints: false
},
stats: {
colors: true
},
module: {
rules: [
{
Expand Down
2 changes: 0 additions & 2 deletions build-config/fragments/min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ module.exports = {
minimize: true,
minimizer: [
new TerserPlugin({
sourceMap: true,
parallel: true,
cache: './.build_cache/terser',
extractComments: false,
terserOptions: {
output: {
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const firefoxFlags = {
module.exports = function(config) {
var configuration = {
basePath: '',
frameworks: ['jasmine', 'jasmine-matchers'],
frameworks: ['jasmine', 'jasmine-matchers', 'webpack'],
hostname: 'localhost',
port: 9876,
logLevel: config.LOG_INFO,
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@
"karma-jasmine": "4.0.1",
"karma-jasmine-matchers": "4.0.2",
"karma-verbose-reporter": "0.0.6",
"karma-webpack": "^4.0.2",
"karma-webpack": "^5.0.0-alpha.5",
"lint-staged": "^10.5.3",
"load-script": "^1.0.0",
"pre-commit": "^1.2.2",
"terser-webpack-plugin": "^4.2.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack": "^5.10.1",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.5.0"
"webpack-merge": "^5.7.0"
},
"homepage": "https://wavesurfer-js.org",
"pre-commit": "lint-js-html",
Expand Down

0 comments on commit b234794

Please sign in to comment.