Skip to content

Commit

Permalink
feat: drop IE support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: an es5-specific build is included in the dist
closes #83
  • Loading branch information
Jack Ellis authored and jackmellis committed Sep 25, 2020
1 parent d70483b commit 53508cc
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 89 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Change Log
- removed the built-in dependency `$options`. You can no longer do `.resolve({ foo: 'someValue' })`
- removed the built-in dependency `$resolve`
- `precedence` option lets you determine if a factory should overwrite an existing factory or not
- Support for IE11 has been dropped by default. If you want a fully ES5-compatible version, you can import `jpex/dist/es5.js`

#### Breaking Changes
- if you attempt to resolve a global like `Window` without registering it first, rather than throw an error, you will now get the global variable
Expand All @@ -22,6 +23,7 @@ Change Log
- `Lifecycle` is now a type rather than an enum
- wrapping a name in `__` will no longer make it optional, you must explicitly pass the optional flag
- `$options` and `$resolve` functionality have been removed
- If you want to support IE11 you will need to import `jpex/dist/es5.js` or create an alias for it

### 3.5.1
- building with webpack was giving warnings about `require` being used which meant it couldn't make optimizations
Expand Down
3 changes: 1 addition & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ module.exports = {
{
targets: {
browsers: [
'last 2 versions',
'safari >= 7',
'> 2%',
],
},
modules: false,
Expand Down
45 changes: 45 additions & 0 deletions rollup.config.es5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import babel from 'rollup-plugin-babel';
import localResolve from 'rollup-plugin-node-resolve';
import path from 'path';

export default {
input: 'src/index.ts',
output: [
{
file: 'dist/es5.js',
format: 'cjs',
exports: 'named',
},
],
plugins: [
localResolve({
extensions: [ '.js', '.ts' ],
}),
babel({
exclude: 'node_modules/**',
extensions: [ '.js', '.ts' ],
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: [
'last 2 versions',
'safari >= 7',
],
},
modules: false,
useBuiltIns: false,
loose: true,
},
],
],
plugins: [
[
path.resolve('./babel-plugin.js'),
{ publicPath: true },
],
],
}),
],
};
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import plugin from './rollup.config.plugin';
import src from './rollup.config.src';
import es5 from './rollup.config.es5';

export default [
plugin,
src,
es5,
];
Loading

0 comments on commit 53508cc

Please # to comment.