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

Can't get replaceRequireScript working #92

Open
Rainbowlemon opened this issue Mar 17, 2014 · 4 comments
Open

Can't get replaceRequireScript working #92

Rainbowlemon opened this issue Mar 17, 2014 · 4 comments
Assignees
Labels

Comments

@Rainbowlemon
Copy link

I'm attempting to insert my pkg.version into the modulePath (to avoid caching), but the package name just keeps defaulting to the 'data-main' of the original script tag.

This code worked before (about 2 months ago), but has broken since I last tried it, I assume due to 78a3ec5 - it looks like 'file.modulePath' isn't returning anything (line 42 of replace.js).

Oddly, the file is named correctly - it's just the script tags that aren't updated properly.

options: {
                    name: 'main',
                    mainConfigFile: 'web/app/main.js',
                    out: 'temp/app/<%= pkg.version %>.js',
                    preserveLicenseComments: false,
                    almond: true,
                    replaceRequireScript: [{
                        files: ['temp/index.html'],
                        module: 'main',
                        modulePath: '/app/<%= pkg.version %>'
                    }]
                }
@asciidisco asciidisco added the bug label Mar 30, 2014
@asciidisco asciidisco self-assigned this Mar 30, 2014
@asciidisco
Copy link
Owner

Thanks for the detailed report. Do you think you could be coming up with a PR & in case you're not able to, at least a failing unit test so that someone else is able to tackle the issue?!

Thanks.

@sytelus
Copy link

sytelus commented Apr 21, 2014

+1. I'd put exact same config after a lot of research and it finally worked two months ago. Not anymore...

Adding @nitinhayaran to the thread who authored above change.

@nitinhayaran
Copy link
Contributor

Can someone please confirm if the issue persists in current master.
There was some issue with use of modulePath in 78a3ec5 but that was fixed in 940e41d

@Rainbowlemon
Copy link
Author

This issue seems to have been fixed by ec2691f

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

No branches or pull requests

4 participants