Ires Putra
Ires Putra

Reputation: 11

IONIC Cant build android --prod, because of Broken @import declaration of

I cant build on --prod mode, the error was

enter image description here

Those files are exists

enter image description here

the normal build was fine, but with --prod i cant build the apk. Anyone can help?

-----SOLVED---------------------------------- okay this is solved by adding `options: {processImport: false} on node_module\@ionic\app-scripts\config\cleancss.config.js

Upvotes: 1

Views: 197

Answers (1)

Modesto
Modesto

Reputation: 703

Similar solution, but this way you wont loose anything after update @ionic/app-scripts:

insert into package.json file:

{
  {... other configs....},

 "config": {
        "ionic_cleancss": "./config/cleancss.config.js"
    }
}

create the file ./config/cleancss.config.js:

module.exports = {
  options: {processImport: false}
};

Upvotes: 1

Related Questions