allen-cell-animated / website-3d-cell-viewer

Other
4 stars 4 forks source link

Use `webpack.common.js` instead of `webpack.dev.js` for deployments #247

Open ShrimpCryptid opened 2 months ago

ShrimpCryptid commented 2 months ago

Use Case

Currently, GH and S3 builds rely on webpack.dev.js (instead of webpack.common.js). Switch them to use webpack.common.js instead to avoid unintended consequences if editing the dev server?

    "start": "webpack serve --config webpack.dev.js  --env env=dev",
    "gh-build-nightly": "webpack --config webpack.dev.js --env env=production basename=/website-3d-cell-viewer",
    "gh-build-release": "webpack --config webpack.dev.js --env env=production basename=/website-3d-cell-viewer-release",
    "s3-build": "webpack --config webpack.dev.js --env env=production",

Solution

Please describe your ideal solution

Alternatives

Please describe any alternatives you've considered, even if you've dismissed them

toloudis commented 2 months ago

Just wondering - does this mean we don't need both and can consolidate into just one webpack config file? (aka webpack.config.js) (Tangential idea: switch to vite)

ShrimpCryptid commented 2 months ago

I think we do still need the webpack.dev.js config to enable route management when running the local dev server? But I think that's the only case where we'd need it.

@ switching to vite: hell yeah 😎

ShrimpCryptid commented 2 months ago

Actually yes, I think you're right. We can probably move that setting to the default webpack server, and it would just not do anything for all the built versions of w3cv.