Closed rickmed closed 8 years ago
I got it to work like this (meteor 1.3.2):
on entry.js:
import 'meteor-imports' const { Mongo } = Package.mongo const { Tracker } = Package.tracker const { Meteor } = Package.meteor
@rickmed I am glad this is useful.
If you find the fix make a PR and I will accept it.
I just want to add another reason for this error is when it tries to package css files!
merged-stylesheets.css C:\repo\ReactJS_seedProject\node_modules\meteor-imports-webpack-plugin\index.js:92 var packageName = /^packages\/(.+).js$/.exec(pckge.path)[1];
The regex fails,
The solution is to delete all the CSS files in the meteor directory, or to fix code so it ignores css bundles?
I think it could be possible to ignore css files. Could you please do a PR?
I find it problematically with both CSS and the main app file. Those are not inside /packages/
and therefore the exec
returns null
. I am working in a fix for it.
fixed by #11
Okay, the fix is published as 1.1.1
!
Hey. Cool library. I'm getting this error on npm run client
var packageName = /^packages\/(.+).js$/.exec(pckge.path)[1]; ^
TypeError: Cannot read property '1' of null