Webpack-built static files failing to load for Cordova -


i'm following instructions in tutorial deploy , app cordova + webpack. reason when try run on browse, cordova gives me 404's static assets:

david@david-virtual-machine:~/projects/cordova-test$ cordova run browser running command: /home/david/projects/cordova-test/platforms/browser/cordova/build  cleaning browser project running command: /home/david/projects/cordova-test/platforms/browser/cordova/run --nobuild static file server running @ http://localhost:8000/index.html ctrl + c shut down 200 /index.html 404 /static/css/app.3c9c2d2745129a92d9df90dcbb7c563b.css 404 /static/js/manifest.0dd6d31ff0e703dde7d0.js 404 /static/js/vendor.4670d164c016bf835824.js 404 /static/js/app.4dcb8ba8e1d1c82414f6.js 404 /favicon.ico 404 /static/css/app.3c9c2d2745129a92d9df90dcbb7c563b.css 

as says in tutorial, i've edited config/index.js this:

var path = require('path')  module.exports = {   build: {     env: require('./prod.env'),     index: path.resolve(__dirname, '../www/index.html'),     assetsroot: path.resolve(__dirname, '../dist'),     assetssubdirectory: 'static',     assetspublicpath: './',     productionsourcemap: true,     // gzip off default many popular static hosts such     // surge or netlify gzip static assets you.     // before setting `true`, make sure to:     // npm install --save-dev compression-webpack-plugin     productiongzip: false,     productiongzipextensions: ['js', 'css'],     // run build command argument     // view bundle analyzer report after build finishes:     // `npm run build --report`     // set `true` or `false` turn on or off     bundleanalyzerreport: process.env.npm_config_report   }, ... 

any ideas going wrong?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -