I followed the documentation about
Custom Config Files. For this, I copied the
rollup.config.js from
node_modules/@ionic/app-scripts/config into my own
config directory. Then I changed my
package.json according to the documentation:
1 2 3 | "config" : {
"ionic_rollup" : "./config/rollup.config.js"
},
|
But now the build reported:
1 2 | Config file "/Users/.../config/rollup.config.js" not found. Using defaults instead.
Error: Cannot find module '../dist/plugins/ng-template'
|
As every developer, I tried to solve the first message. But the config file was at exact the reported place. Finally, after checking the code, I found it just "misleading". The problem ist the second message. The first line of the copied
rollup.config.js was
1 | var ngTemplate = require( '../dist/plugins/ng-template' ).ngTemplate;
|
Since I moved the file, the relative path didn't work any more. There for I changed the first line to
1 | var ngTemplate = require( '../node_modules/@ionic/app-scripts/dist/plugins/ng-template' ).ngTemplate;
|
And both error messages were history.
Update 9-Oct-2016: Latest with
@ionic/app-scripts@0.0.30,
ngTemplate is no longer required by rollup. Therefore the mentioned error does not occur anymore.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.