Closed solaris7791 closed 6 years ago
How I see, mixins in quasar-framework don`t traspilling. I have same trouble.
Hi,
Can you write a minimal reproduction repo? I want to see your use-case. Details are important. Thanks.
@rstoenescu, I tried on empty repo(genering by you cli). And I have that bug with transpilling. Just write in some component some ES6 construction(ex: spred/rest operator) and you see it in chunk in build. If You want to try see: https://github.com/flespi-software/TrackIt
Got it. Reproduced issue. Under investigation.
Fix is being currently tested. You can do too if you replace the Quasar CLI version to this exact version: "0.17.0-beta.36". (ONLY temporary, because Quasar CLI v0.17.6 will be the official version)
I saw you are also importing uncompiled .vue files from node_modules. This is not good practice. But anyway, added exception for Babel to also transpile any .vue file in node_modules. Try with "0.17.0-beta.39". On your app there's still an error in IE11, but it's not related to Quasar.
hi, if it helps, I fixed the issue for me, after adding a small fix in quasar.conf.js in chainWebpack(chain) { chain.module.rule('babel').exclude.clear() }
seems the exclude of node_modules in create-chain.js is the cause.
Can You tell me pls, Why in 15.. cli .vue files from node_modules transpiring normally, but now we have a troubles? Anything troubles with babel? And I tried 38beta, and now don't transpilling another file then before. Maybe I can help you with it? Now you chaining vue-loader - babel, but before you chained babel - [vue-loader with babel]. Maybe bug is here?
Since v0.15 the webpack version changed, the babel version changed, and there's a logical error in webpack now with the include/exclude. Fails on some particular linux versions... anyway, long explanation. Did you test with beta.39? Please contact me on Discord to speed things up.
Also, other vue-loader in v0.15... lots changed in these packages.
Fixed in CLI v0.17.6.
Had exact same issue with quasar-cli 0.17.23
I had to play with include/exclude rules in quasar.conf.js
's extendWebpack (cfg) { ... }
section to avoid the error.
Something like this:
// UGLY HACK to force babel to transpile quasar-framework files
// cfg.module.rules[1] represents rule for processing "*.js" files
// see https://github.com/quasarframework/quasar-cli/issues/160
cfg.module.rules[1].include = [
// specific paths of your app which need to be transpiled
path.resolve(__dirname, "src/plugins"),
path.resolve(__dirname, "src/router"),
path.resolve(__dirname, "src/store"),
// quasar framework paths
path.resolve(__dirname, ".quasar"),
path.resolve(__dirname, "node_modules/quasar-framework") // otherwise src/plugins/platform.js is not transpiled and contains ES6 specific code
]
I could not override easily the "exclude" function on the fly + I already have defined a list of "include" directories previously, therefore I went for updating the "include" list. However, overriding the "exclude" function could be also a workaround.
EDIT : maybe I got this error because I was already overriding the list of directories to include for transpiling ; it does not looks that the problem is form Quasar CLI, nor its default configuration.
Hello, with cli 0.17.4 the problem with transpiling platform.js for IE/Edge has reappeared Quasar CLI........ v0.17.5 Quasar Framework.. v0.17.4
platform.js ... is: getPlatform(), ...getClientProperties() Spread operator causes script error in IE/Edge