fix: rollup 配置

This commit is contained in:
thinkinggis 2021-07-26 15:10:13 +08:00
parent 12639ad9c4
commit 644c37c662
3 changed files with 8 additions and 6 deletions

View File

@ -10,7 +10,9 @@ module.exports = api => {
if (isSite) {
return {
presets: [
'babel-preset-gatsby'
'babel-preset-gatsby', {
silence: true
}
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
@ -19,7 +21,7 @@ module.exports = api => {
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
legacy: true
}
],
[
@ -81,7 +83,7 @@ module.exports = api => {
'@babel/plugin-proposal-class-properties',
{
// @see https://github.com/storybookjs/storybook/issues/6069#issuecomment-472544973
loose: true
loose: false
}
],
'@babel/plugin-syntax-dynamic-import',

View File

@ -72,7 +72,7 @@ module.exports = [
commonjs({
namedExports: {
eventemitter3: [ 'EventEmitter' ],
inversify: [ 'inject', 'injectable', 'postConstruct', 'Container', 'decorate', 'interfaces' ],
// inversify: [ 'inject', 'injectable', 'postConstruct', 'Container', 'decorate', 'interfaces' ],
// @see https://github.com/rollup/rollup-plugin-commonjs/issues/266
lodash: [
'isNil',

View File

@ -25,8 +25,8 @@ export default {
commonjs({
namedExports: {
eventemitter3: [ 'EventEmitter' ],
lodash: [ 'merge' ],
inversify: [ 'inject', 'injectable' ]
lodash: [ 'merge' ]
// inversify: [ 'inject', 'injectable' ]
},
dynamicRequireTargets: [
'node_modules/inversify/lib/syntax/binding_{on,when}_syntax.js'