openfisca / legislation-explorer

Explore legislation formulas and parameters.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
26 stars 12 forks source link

Take .env into account when building webpack for prod #173

Closed fpagnoux closed 6 years ago

fpagnoux commented 6 years ago

See https://github.com/openfisca/legislation-explorer/pull/171 for issue description

fpagnoux commented 6 years ago

Another approach that seems to work is to change npm run build from webpack --config ./webpack.config.prod.babel.js to node --require dotenv/config node_modules/webpack/bin/webpack.js --config ./webpack.config.prod.babel.js

A little ugly but more consistent with npm run dev and npm start.

Reviewers, let me know if you have a preference :)

Anna-Livia commented 6 years ago

@fpagnoux I like node --require dotenv/config node_modules/webpack/bin/webpack.js --config ./webpack.config.prod.babel.js better because of the constistency with the other scripts.