Skip to content

Commit

Permalink
fix: import history from ESM (#934)
Browse files Browse the repository at this point in the history
Removing closure compiiler fixes the problem. The build is now much faster and the resulting file size difference is marginal.
  • Loading branch information
ryanflorence committed Feb 4, 2022
1 parent 8117ab2 commit ba1cd3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
},
"filesize": {
"build/history/history.production.min.js": {
"none": "5 kB"
"none": "5.06 kB"
},
"build/history/umd/history.production.min.js": {
"none": "6 kB"
"none": "6.03 kB"
}
}
}
13 changes: 3 additions & 10 deletions scripts/rollup/history.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { babel } from '@rollup/plugin-babel';
import compiler from '@ampproject/rollup-plugin-closure-compiler';
import copy from 'rollup-plugin-copy';
import prettier from 'rollup-plugin-prettier';
import replace from '@rollup/plugin-replace';
Expand Down Expand Up @@ -37,7 +36,6 @@ const modules = [
],
babelHelpers: 'runtime'
}),
compiler(),
copy({
targets: [
{ src: 'README.md', dest: OUTPUT_DIR },
Expand Down Expand Up @@ -70,8 +68,7 @@ const modules = [
presets: [['@babel/preset-env', { loose: true }]],
plugins: ['babel-plugin-dev-expression'],
babelHelpers: 'bundled'
}),
compiler()
})
].concat(PRETTY ? prettier({ parser: 'babel' }) : [])
};
})
Expand Down Expand Up @@ -103,8 +100,7 @@ const webModules = [
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
preventAssignment: false
}),
compiler()
})
].concat(PRETTY ? prettier({ parser: 'babel' }) : [])
},
{
Expand Down Expand Up @@ -133,7 +129,6 @@ const webModules = [
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: false
}),
compiler(),
terser({ ecma: 8, safari10: true })
].concat(PRETTY ? prettier({ parser: 'babel' }) : [])
}
Expand All @@ -160,8 +155,7 @@ const globals = [
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
preventAssignment: false
}),
compiler()
})
].concat(PRETTY ? prettier({ parser: 'babel' }) : [])
},
{
Expand All @@ -185,7 +179,6 @@ const globals = [
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: false
}),
compiler(),
terser()
].concat(PRETTY ? prettier({ parser: 'babel' }) : [])
}
Expand Down

0 comments on commit ba1cd3c

Please sign in to comment.