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

Adding query parameter to inline.js (e.g. src="inline.js?1478695804") in index.html caused an error #3083

Closed
divyeshpuk opened this issue Nov 9, 2016 · 6 comments

Comments

@divyeshpuk
Copy link

divyeshpuk commented Nov 9, 2016

Please provide us with the following information:

OS?

os: linux x64

Versions.

angular-cli: 1.0.0-beta.16
node: 5.4.0
os: linux x64

Repro steps.

Added query parameter to inline.js (e.g. src="inline.js?1478695804") in index.html to bust browser cache

The log given by the failure.

Type Error: cannot read property call of undefined
Unhandled promise rejection: cannot read property call of undefined, zone: Angular, Task: Promise.then, value: Type Error...

Mention any other details that might be useful.

The query parameter was added to bust browser cache.
pasted_image_at_2016_11_08_02_10_pm


Thanks! We'll be in touch soon.

@divyeshpuk divyeshpuk changed the title Adding query parameter to inline.js (e.g. src="inline.js?1478695804") caused an error Adding query parameter to inline.js (e.g. src="inline.js?1478695804") in index.html caused an error Nov 9, 2016
@grizzm0
Copy link
Contributor

grizzm0 commented Nov 9, 2016

I can't see how that would break anything and it works just fine here.

Anyhow, reporting an issue after altering anything the cli gives you doesn't really make sense as it's out of the scope of the cli.

@divyeshpuk
Copy link
Author

Thank you. But this works much better for Beta-16 that we are using.
var timestamp = Date.now();
new webpack.optimize.CommonsChunkPlugin({
minChunks: Infinity,
name: 'inline',
filename: 'inline.'+timestamp+'.js',
sourceMapFilename: 'inline.'+timestamp+'.map'
}),

@inska
Copy link

inska commented Nov 11, 2016

@divyeshpuk Do you build with custom webpack build options? how? is it possible with latest angular cli?

@divyeshpuk
Copy link
Author

divyeshpuk commented Nov 11, 2016

@inska I changed the config/index.html both through Bash script in the Jenkins build. You don't have to do both if you're just browser cache busting. Either will work.

@filipesilva
Copy link
Contributor

Fixed by #2899

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants