caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
620 stars 154 forks source link

lodash/lodash.js" as it exceeds the max of "500KB". #101

Closed edoofx closed 6 years ago

edoofx commented 6 years ago

cordova : 8.0.0 android : 7.0.0 node : 8.9.4 npm : 5.6.0

trying to downgrade cordova to 6.5.0 . same.

Error: Error happened when webpack build: Error: Command failed: "C:\apps\v2test\node_modules\.bin\webpack.cmd"
[BABEL] Note: The code generator has deoptimised the styling of "C:/apps/v2test/node_modules/lodash/lodash.js" as it exceeds the max of "500KB".
[BABEL] Note: The code generator has deoptimised the styling of "C:/apps/v2test/node_modules/framework7/dist/framework7.esm.bundle.js" as it exceeds the max of "500KB".
caiobiodere commented 6 years ago

please check using this issue https://github.com/caiobiodere/cordova-template-framework7-vue-webpack/issues/55

edoofx commented 6 years ago

i guess different problem..

im trying with ur refference . same.

delete file package lock . run npm install . cordova run android .

getting

Error: Error happened when webpack build: Error: Command failed: "C:\apps\v2test\node_modules\.bin\webpack.cmd"
[BABEL] Note: The code generator has deoptimised the styling of "C:/apps/v2test/node_modules/lodash/lodash.js" as it exceeds the max of "500KB".
[BABEL] Note: The code generator has deoptimised the styling of "C:/apps/v2test/node_modules/framework7/dist/framework7.esm.bundle.js" as it exceeds the max of "500KB".
teddyhendryanto commented 6 years ago

hi @caiobiodere , @edoofx

sorry for jump in. I got stuck for 3 hours in same error when execute cordova run browser on my windows10 x64.

Error: Error happened when webpack build: Error: Command failed: "C:\wamp\www\com.example.text\node_modules.bin\webpack.cmd" [BABEL] Note: The code generator has deoptimised the styling of "C:/wamp/www/com.example.text/node_modules/lodash/lodash.js" as it exceeds the max of "500KB". [BABEL] Note: The code generator has deoptimised the styling of "C:/wamp/www/com.example.text/node_modules/framework7/dist/framework7.esm.bundle.js" as it exceeds the max of "500KB".

I've tested run in Linux Ubuntu 17.10 and it is running well.

My current version cordova : 8.0.0 android : 7.0.0 node : 8.9.4 npm : 5.6.0

Need your advice. Thank you

inallweather commented 6 years ago

i have added 'exclude: /node_modules/ ' [test: /.vue$/,exclude: /node_modules/, loader: 'vue-loader'] in webpack.config.js My current version cordova 8.0.0 android 7.0 node 8.10 OS: win10 x64

teddyhendryanto commented 6 years ago

@inallweather thank you for your response. sorry i'm not good enough in webpack. can you show me, which part should I add in webpack.config.js? thank you..

inallweather commented 6 years ago

in the wepack.config.js file, do you look for the module:{ rules:[ {test: /.vue$/, exclude: /node_modules/, loader: 'vue-loader',** options: {loaders: {js: {loader: 'babel-loader', options: {presets: ['env'], plugins: ['transform-object-rest-spread']}}}}}]}

caiobiodere commented 6 years ago

@inallweather I made your tips :) Hey @teddyhendryanto could you change your webpack config file using this?

From -> {test: /\.vue$/, loader: 'vue-loader', options: {loaders: {js: {loader: 'babel-loader', options: {presets: ['env'], plugins: ['transform-object-rest-spread']}}}}}, {test: /\.js$/, exclude: /node_modules\/(?!(framework7|framework7-vue|template7|dom7)\/).*/, use: {loader: 'babel-loader', options: {presets: ['env'], plugins: [ 'transform-runtime', 'transform-object-rest-spread' ]}}}

To -> {test: /\.vue$/, exclude: /node_modules/, loader: 'vue-loader', options: {loaders: {js: {loader: 'babel-loader', options: {presets: ['env'], plugins: ['transform-object-rest-spread']}}}}}, {test: /\.js$/, exclude: /node_modules(\/|\\)(?!(framework7|framework7-vue|template7|dom7)(\/|\\)).*/, use: {loader: 'babel-loader', options: {presets: ['env'], plugins: [ 'transform-runtime', 'transform-object-rest-spread' ]}}}

inallweather commented 6 years ago

yes

edoofx commented 6 years ago

like @teddyhendryanto says .. im using ubuntu for now , and no one problem , even with fresh clone like im doing before.. but on windows . error error error and error ..

@caiobiodere thanks in advance..

teddyhendryanto commented 6 years ago

@caiobiodere woww. after changing webpack config with your code, it works fine now!! now I can start develop with your template using windows. Thank you.. :)

caiobiodere commented 6 years ago

Great work! :)