Skip to content

Commit

Permalink
fix(stark-build): transpile certain third party libs to ES5 only in D…
Browse files Browse the repository at this point in the history
…EV to prevent breaking support for IE 11

ISSUES CLOSED: #900
  • Loading branch information
christophercr committed Dec 4, 2018
1 parent 2d38032 commit c762f8d
Show file tree
Hide file tree
Showing 3 changed files with 766 additions and 115 deletions.
23 changes: 23 additions & 0 deletions packages/stark-build/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,29 @@ module.exports = function(env) {

module: {
rules: [
/**
* Prevent any external library from breaking support for Internet Explorer 11 (see https://github.com/NationalBankBelgium/stark/issues/900)
* Therefore, only certain libraries in 'node_modules' (except the biggest ones and the ones from NBB) are transpiled to ES5 with Babel
* reference: https://github.com/babel/babel-loader
*/
{
test: /node_modules\\.*\.js$/,
exclude: /node_modules\\(@angular|@mdi|@ng-idle|@nationalbankbelgium|@ngrx|@ngx-translate|@uirouter|cerialize|class-validator|core-js|ibantools|lodash|prettier|rxjs)/,
use: {
loader: "babel-loader",
options: {
presets: [
[
"@babel/preset-env",
{
// Environments you support/target. See https://babeljs.io/docs/en/babel-preset-env#targets
targets: { ie: "11" }
}
]
]
}
}
},
/**
* Css loader support for *.css files (styles directory only)
* Loads external css styles into the DOM, supports HMR
Expand Down
Loading

0 comments on commit c762f8d

Please sign in to comment.