Thanks @benjamn, but it still prompt the same error
I donāt know much about Joi except that it is used in hapi.js. Are you using it to replace SimpleSchema or Collection2? If so, how are you doing it?
I couldnāt get Joi to work because of what I mentioned above. I had to use Yup instead which is a drop in replacement. It also integrates with the NPM form packages that I listed there too.
Yes I am using them to replace SS and C2.
I just went from 1.3b4 to 1.3b6ā¦ I had some code like this:
export default {
a: 1,
b: 2
}
I would import like this:
import {a, b} from './stuff.jsx';
Seems you canāt do this on beta 6 so I had to switch to something like this:
export const a = 1;
export const b = 2;
Then imported the same way. Is this intended?
@ciwolsey yes, see https://phabricator.babeljs.io/T2212
Everything is a named export now, even the default export, whose name is simply default
. The value you export default
is no longer assigned to module.exports
; in fact, module.exports
is never altered by the Babel 6 modules-to-CommonJS transform.
Is there a new release? I noticed beta 7 is available, can we test it?
New release!
To update to the latest beta release, run the following command in your meteor project:
meteor update --release 1.3-modules-beta.7
Changes: https://github.com/meteor/meteor/issues/5788#issuecomment-180405842
Thanks @benjamn I fixed the import meteor issue in 1.3beta7.May I ask about how can I import the account-base
package, it seems like import {Accounts} from 'accounts-base
ā doesnāt work
Iām noticing an increase in performance with the rebuilds! This is a fairly new app and will have tons more added, weāll see how rebuilds go.
Beta 7ās working great for me. Rebuild and refresh of my little test app is taking about 5 seconds
It seems, that cfs
now broken with beta-7
. I see this:
While computing assigned variables:
/packages/cfs_power-queue/packages/cfs_power-queue.js: Deleting local
variable in strict mode (541:4)
=> Your application has errors. Waiting for file change.
I got an endless list of babel messages like these:
babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee MemberE
xpression: enter +1ms
babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee MemberE
xpression: Recursing into... +0ms
babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee.object
Identifier: enter +1ms
babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee.object
Identifier: Recursing into... +0ms
I canceld after 10 minutes.
@marc2 do you have a .babelrc
file lying around somewhere, like maybe your home directory? That looks like debugging output that might somehow be accidentally turned onā¦
@benjamn beta7 has been working great for me!
Any chance weāll eventually get the equivalent of 'resoveRoot` in your packaging system? For example:
import 'lib/myModule'
// instead of
import '../../../../lib/myModule'
This seems to work great n SystemJS and Webpack. Itās one of the things I miss most.
@mquandalle Hmmm its not working for me. Also perhaps related but I also have to use the .js
and .jsx
file extensions. However, iām not using the hackey imports/
folderā¦ perhaps that changes things. Itās just the same file layout as before but upgraded and some imported to fix race conditions.
edit, fixedā¦ the folder really was just both/lib
not lib/
For example:
// works
import authorizeForRole from '../../../lib/authorizeForRole.jsx';
// doesn't work
import authorizeForRole from '/lib/authorizeForRole.jsx';
// also not working (no ext)
import authorizeForRole from '../../../lib/authorizeForRole';
output
Error: Cannot find module '/lib/authorizeForRole.jsx'