-
Notifications
You must be signed in to change notification settings - Fork 311
custom config files not working for PROD #25
Comments
You could pass your production config file in with command line arguments the other option would be to update src/bundle.ts line 159 to something like |
@strictd the 1st option, using arguments, will probably work but I prefer using the Yes, explicitly looking for I think a convention should take place and having 1 config file with added convention name. |
are you looking for prod configs for all ionic-app-script configs or just the rollup config? There is a rollup.prod.config.js file that the bundler defaults to on production builds. |
@strictd I know there is a |
I see your point.. Originally my thought was you wanted a complete second set of config files for prod. Which could be useful past the rollup configs for reasons nobody has thought of yet. |
We're not using a single rollup config file: https://github.com/driftyco/ionic-app-scripts/blob/master/config/rollup.config.js#L56 Within the configs you can now check for: |
doing npm run build or ionic build goes production |
Hi,
When setting the path to a config file in the package.json or using arguments in PROD mode the resolved file is always the default version of the config.
in
runBundle
:The task is identified as PROD and sent to fillConfigDefaults.
fillConfigDefaults will load the configuration files using getConfigFileData (util.ts)
Now, let's assume using config values from
package.json
(env). There is not way to distinguish between prod / dev in theconfig
section so the end result is always loadingxxx.config.js
and notxxx.prod.config.js
. getConfigFileData does not implement prod/dev file selection.Since
config
insidepackage.json
is not aware of prod/dev modes you probably need to decide on a convention to load files based on configuration preset. Something like add.prod
for prod etc...The text was updated successfully, but these errors were encountered: