Angular 捆绑失败:';CloudModule';不导出
我正在尝试将推送通知添加到我的Ionic2应用程序中。我跟在后面。按照ionic2推送文档页面中的建议,在执行ionic io init之前,我的应用程序工作正常。现在,每次执行ionic Service时,我都会遇到此错误Angular 捆绑失败:';CloudModule';不导出,angular,ionic2,Angular,Ionic2,我正在尝试将推送通知添加到我的Ionic2应用程序中。我跟在后面。按照ionic2推送文档页面中的建议,在执行ionic io init之前,我的应用程序工作正常。现在,每次执行ionic Service时,我都会遇到此错误 bundle failed: 'CloudModule' is not exported by node_modules/@ionic/cloud-angular/dist/es5/index.js (imported by src/app/app
bundle failed: 'CloudModule' is not exported by node_modules/@ionic/cloud-angular/dist/es5/index.js
(imported by src/app/app.module.ts). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
为了让它正常工作,我必须按照中的建议将它添加到我的文件rollup.config.js中 node_modules/@ionic/app scripts/config/rollup.config.js
module.exports = {
[...]
useStrict: false,
[...]
plugins: [
ngTemplate(),
commonjs({
include: [
[...]
'node_modules/@ionic/cloud-angular/**',
'node_modules/superagent/**',
'node_modules/@ionic/cloud/node_modules/superagent/**',
'node_modeule/emitter/**',
'node_modules/reduce-component/**',
'node_modules/intl/**',
'node_modules/**',
],
namedExports: {
[...]
}
}),
nodeResolve({
useStrict: false,
module: true,
jsnext: true,
main: true,
browser: true,
extensions: ['.js']
})
]
};
即使这会使构建过程变慢为了使其正常工作,我必须按照中的建议将其添加到我的文件rollup.config.js中 node_modules/@ionic/app scripts/config/rollup.config.js
module.exports = {
[...]
useStrict: false,
[...]
plugins: [
ngTemplate(),
commonjs({
include: [
[...]
'node_modules/@ionic/cloud-angular/**',
'node_modules/superagent/**',
'node_modules/@ionic/cloud/node_modules/superagent/**',
'node_modeule/emitter/**',
'node_modules/reduce-component/**',
'node_modules/intl/**',
'node_modules/**',
],
namedExports: {
[...]
}
}),
nodeResolve({
useStrict: false,
module: true,
jsnext: true,
main: true,
browser: true,
extensions: ['.js']
})
]
};
即使这会使构建过程变慢