Skip to content

Building a compressed version of js files - require causes error #11

Answered by jonnitto
sorenmalling asked this question in Q&A
Discussion options

You must be logged in to vote

Do you use the module version of jquery? I think it would be better if you would import the files from node_modules, so that the bundler can pick the correct version. It looks to me if you are using the AMD version, and if you are looking into the readme https://www.npmjs.com/package/jquery, you will see that it is recommended to import jQuery like that: import $ from "jquery";

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sorenmalling
Comment options

@jonnitto
Comment options

Answer selected by sorenmalling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants