mercredi 27 novembre 2019

After deployment to heroku, modifications to vuejs components and app.scss of laravel app does not update

I have a laravel/vuejs app that works well on localhost. After deploying to heroku, i realized that styles added to app.scss does not compile into my public/css file, thus have no effect. Also, modifications to my vuejs components does not update the app after i push to heroku like so;

git push heroku master

I have added heroku/nodejs buildpack on my heroku dashboard. Here is my webpack.mix.js file content;

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

mix.browserSync({
    proxy: 'localhost:8000'
});

My package.json scripts;

"scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "heroku-prebuild": "export NPM_CONFIG_PRODUCTION=false; export NODE_ENV=; NPM_CONFIG_PRODUCTION=false NODE_ENV=development npm install --only=dev --dev",
        "heroku-postbuild": "export NPM_CONFIG_PRODUCTION=true; export NODE_ENV=production"
    },

NB: I have googled around for solution but didn't find any. Please what am i doing wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire