-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build system: upgrade webpack (#7935)
* Upgrade webpack to 5; gulp build works * Fix karma, except events * Uniform access to events, import * or require (import * from 'events.js' / import events from 'events.js' return different objects, which is a problem for stubbing) * Fix (?) adapters that use `this` inappropriately * Update webpack-bundle-analyzer * Fix warnings * Enable tree shaking * Set webpack mode 'none' (or else tests fail (!)) * Update coreJS version in babelrc - #7943 * Use babel to translate to commonjs only for unit tests; enable production mode * Merge master * Add fsevents as optional dep
- Loading branch information
Showing
52 changed files
with
19,821 additions
and
28,534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1 @@ | ||
|
||
let path = require('path'); | ||
|
||
function useLocal(module) { | ||
return require.resolve(module, { | ||
paths: [ | ||
__dirname | ||
] | ||
}) | ||
} | ||
|
||
module.exports = { | ||
"presets": [ | ||
[ | ||
useLocal('@babel/preset-env'), | ||
{ | ||
"useBuiltIns": "entry", | ||
"corejs": "3.13.0" | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
path.resolve(__dirname, './plugins/pbjsGlobals.js'), | ||
useLocal('babel-plugin-transform-object-assign') | ||
] | ||
}; | ||
module.exports = require('./babelConfig.js')(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
let path = require('path'); | ||
|
||
function useLocal(module) { | ||
return require.resolve(module, { | ||
paths: [ | ||
__dirname | ||
] | ||
}) | ||
} | ||
|
||
module.exports = function (test = false) { | ||
return { | ||
'presets': [ | ||
[ | ||
useLocal('@babel/preset-env'), | ||
{ | ||
'useBuiltIns': 'entry', | ||
'corejs': '3.13.0', | ||
// a lot of tests use sinon.stub & others that stopped working on ES6 modules with webpack 5 | ||
'modules': test ? 'commonjs' : 'auto', | ||
} | ||
] | ||
], | ||
'plugins': [ | ||
path.resolve(__dirname, './plugins/pbjsGlobals.js'), | ||
useLocal('babel-plugin-transform-object-assign'), | ||
], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.