quasar build (pwa) with custom folder name? #8966
-
Is there a way to customize the output folder name for a build command? For example, I would like to build beta and prod versions of my pwa and have them output to something like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
you can use CopyWebPackPlugin, then use // quasar.conf.js
extendWebpack (cfg) {
...
if (ctx.prod) {
cfg.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, './dist'), // better to change your `distDir` as this gets cleaned up every time you run quasar build
to: './dist/' + process.env.SOME_VAR
}
]
})
)
} ie. package.json>scripts> |
Beta Was this translation helpful? Give feedback.
-
quasar.conf.js > build > distDir (set this to a relative path to project root directory) https://quasar.dev/quasar-cli/quasar-conf-js#property-build You can even configure it dynamically based on an console ENV variable: // $ BETA=true quasar build -m pwa (will output to dist/beta)
// $ quasar build -m pwa (will output to dist/prod)
// quasar.conf.js
build: {
distDir: process.env.BETA ? 'dist/beta' : 'dist/prod' |
Beta Was this translation helpful? Give feedback.
quasar.conf.js > build > distDir (set this to a relative path to project root directory) https://quasar.dev/quasar-cli/quasar-conf-js#property-build
You can even configure it dynamically based on an console ENV variable: