Closed i-no closed 4 years ago
I'm using latest framework7-vue-webpack template. When I'm trying to build the app with cordova build browser --release, I'm getting an error message:
cordova build browser --release
Error happened when webpack build: Error: Command failed: "/Users/ino/Work/HTML5/image-upload-app/node_modules/.bin/webpack" --env.release /Users/ino/Work/HTML5/image-upload-app/node_modules/webpack-cli/bin/cli.js:93 throw err; ^ ReferenceError: path is not defined at module.exports (/Users/ino/Work/HTML5/image-upload-app/config/webpack.release.js:24:15)
Error happened when webpack build: Error: Command failed: "/Users/ino/Work/HTML5/image-upload-app/node_modules/.bin/webpack" --env.release /Users/ino/Work/HTML5/image-upload-app/node_modules/webpack-cli/bin/cli.js:93 throw err; ^
ReferenceError: path is not defined at module.exports (/Users/ino/Work/HTML5/image-upload-app/config/webpack.release.js:24:15)
I think the problem is related with update of clean-webpack-plugin to the 3.0.0 version. They changed options and parameters list for this plugin.
clean-webpack-plugin
I fixed this problem by changing config/webpack.release.js file:
config/webpack.release.js
... const { CleanWebpackPlugin } = require('clean-webpack-plugin'); ... module.exports = function() { return webpackMerge(commonConfig({ mode: 'production' }), { ... plugins: [ ... new CleanWebpackPlugin({ dry: false, verbose: false }) ] }); };
But I'm not sure if that's a correct solution. At least after this changes I can get release build for browser.
thank you mate, I just fixed it on the new 2.4.4 version
I'm using latest framework7-vue-webpack template. When I'm trying to build the app with
cordova build browser --release
, I'm getting an error message:I think the problem is related with update of
clean-webpack-plugin
to the 3.0.0 version. They changed options and parameters list for this plugin.I fixed this problem by changing
config/webpack.release.js
file:But I'm not sure if that's a correct solution. At least after this changes I can get release build for browser.