Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.8 breaks duo #12

Open
dominicbarnes opened this issue May 11, 2015 · 3 comments
Open

0.0.8 breaks duo #12

dominicbarnes opened this issue May 11, 2015 · 3 comments

Comments

@dominicbarnes
Copy link

Hey @matthewmueller, I tried to upgrade to [email protected] in duo, but it breaks a lot of functionality. Namely, #7 has caused duo to not rewrite things like @import "./one.css"; since the ./ is being stripped.

The mapping going to duo-pack basically looks like:

{ 'index.css':
   { id: 'index.css',
     type: 'css',
     mtime: 1431373205000,
     src: '@import "./one.css";\n\n.index {\n  color: white;\n}\n',
     deps: { 'one.css': 'one.css' },
     entry: true },
  'one.css':
   { id: 'one.css',
     type: 'css',
     mtime: 1417547024000,
     src: '.one {\n  color: green;\n}\n\n@import \'./two.css\';\n',
     deps: { 'two.css': 'two.css' } },
  'two.css':
   { id: 'two.css',
     type: 'css',
     mtime: 1417547024000,
     src: '.two {\n  color: red;\n}\n',
     deps: {} } }

The deps are now different, so duo-pack is not resolving them correctly.

Should this result in a change to duo-pack? Or is this a regression?

@matthewmueller
Copy link
Contributor

Hm.. that sounds like a regression and I'm surprised I didn't immediately update to 0.0.8 when I released.

@dominicbarnes
Copy link
Author

Well, duo-pack uses 0.0.x, so it gets 0.0.8 as expected.

However, duo uses ^0.0.7 which does not update to 0.0.8 automatically, it just keeps 0.0.7.

@dominicbarnes
Copy link
Author

I believe the changes made for 0.0.8 need to be reverted.

The problem seeking to be addressed was the fact that the same deps could be represented in different ways. (eg: ./a.png and a.png) However, that should be normalized by the consumer of file-deps.

Any data that is stripped or modified by file-deps cannot be recovered by consumers, which is why duo breaks. The same applies for stripping the #hash from a URL for something like the IE font fix. There is no way duo can possibly resolve the original source again after that data was stripped.

@matthewmueller do you have the time to make such a change? If not, do you mind moving this to the duojs org as well so I can address it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants