caolan / jam

JavaScript package manager - using a browser-focused and RequireJS compatible repository
MIT License
1.5k stars 105 forks source link

Sovling relative path wrong in Chrome extension? #155

Open tiye opened 11 years ago

tiye commented 11 years ago
➤➤ tree -I jam
.
├── coffee
├── index.html
├── lib
│   ├── bg.js
│   ├── bg.map
│   ├── find.js
├── manifest.json
├── package.json

in index.html I wrote:

<script src="./jam/require.js" data-main="./lib/find"></script>

in find.js I have such code:

define(function(require, exports) {
  console.lo(require("ractive"))
})

then I found error in my console:

chrome-extension://cffemmeembnmkikanliicdpcoahbkgij/lib/jam/ractive/Ractive.js

which should be:

chrome-extension://cffemmeembnmkikanliicdpcoahbkgij/jam/ractive/Ractive.js