You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2020. It is now read-only.
I'm using a custom rollup config and after the upgrade to v0.0.42 it's not running ionic serve anymore. I'm getting "rollup failed: Could not resolve './app.module' from ...app\src\app\main.dev.ts".
My custom rollup.config is just to add env variables into my app. I got the idea from here ionic-team/ionic-framework#8370
If, there is a better way to do it or a way to do it with webpack, it would be good to know.
What behavior are you expecting?
After the upgrade to the newest version, it should still work.
This is my rollup.config.j
var nodeResolve = require('rollup-plugin-node-resolve');
var commonjs = require('rollup-plugin-commonjs');
var globals = require('rollup-plugin-node-globals');
var builtins = require('rollup-plugin-node-builtins');
var json = require('rollup-plugin-json');
var replace = require('rollup-plugin-replace');
var fs = require('fs');
// https://github.com/rollup/rollup/wiki/JavaScript-API
var rollupConfig = {
/**
* entry: The bundle's starting point. This file will
* be included, along with the minimum necessary code
* from its dependencies
*/
entry: '{{SRC}}/app/main.dev.ts',
/**
* sourceMap: If true, a separate sourcemap file will
* be created.
*/
sourceMap: true,
/**
* format: The format of the generated bundle
*/
format: 'iife',
/**
* dest: the output filename for the bundle in the buildDir
*/
dest: 'main.js',
/**
* plugins: Array of plugin objects, or a single plugin object.
* See https://github.com/rollup/rollup/wiki/Plugins for more info.
*/
plugins: [
replace({
include: 'src/config/index.ts',
'./config': process.env.IONIC_ENV == 'prod' ? './config.prod' : './config.dev',
}),
builtins(),
commonjs(),
nodeResolve({
module: true,
jsnext: true,
main: true,
browser: true,
extensions: ['.js']
}),
globals(),
json()
]
};
//check if files actually exist
if (process.env.IONIC_ENV == 'prod') {
// production mode
rollupConfig.entry = '{{TMP}}/app/main.prod.ts';
rollupConfig.sourceMap = false;
fs.access('src/config/config.prod.ts', fs.F_OK, (err) => {
if (err) {
throw err;
}
});
} else {
fs.access('src/config/config.dev.ts', fs.F_OK, (err) => {
if (err) {
throw err;
}
});
}
module.exports = rollupConfig;
Short description of the problem:
I'm using a custom rollup config and after the upgrade to v0.0.42 it's not running ionic serve anymore. I'm getting "rollup failed: Could not resolve './app.module' from ...app\src\app\main.dev.ts".
My custom rollup.config is just to add env variables into my app. I got the idea from here ionic-team/ionic-framework#8370
If, there is a better way to do it or a way to do it with webpack, it would be good to know.
What behavior are you expecting?
After the upgrade to the newest version, it should still work.
This is my rollup.config.j
A part of my package.json
Which @ionic/app-scripts version are you using?
v0.0.42
The text was updated successfully, but these errors were encountered: