import pathToRegexp from 'path-to-regexp'
urosgruber opened this issue · 4 comments
I have a problem using this plugin and as soon as I use
import {Router} from 'marionette.routing';
Code builds but then I'm getting the error import pathToRegexp from 'path-to-regexp'
I'm guessing something was not setup correctly. I'm using brunch to build the app.
path-to-regexp is a dependency of cherrytreex which is a dependency of marionette.routing. The bundler should be able to resolve it.
There's one thing missing in cherrytreex: module field. I'll add to see if fix
Please update to version 1.1.0 and try again
Still no luck, but the funny thing is. The cherrytreex/cherrytree.js
is transpiled and left with some import
statement.
This is the beginning of the file
import pathToRegexp from 'path-to-regexp';
var toString = Object.prototype.toString;
var keys = Object.keys;
var assoc = function assoc(obj, attr, val) {
obj[attr] = val;return obj;
};
var isArray = Array.isArray;
This is the intended for optimal output. Webpack, rollup handles that just fine