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

Cannot import cbp-theme using Webpack #24

Closed
apobbati opened this issue Aug 9, 2016 · 4 comments
Closed

Cannot import cbp-theme using Webpack #24

apobbati opened this issue Aug 9, 2016 · 4 comments
Assignees
Labels

Comments

@apobbati
Copy link
Contributor

apobbati commented Aug 9, 2016

To reproduce in a webpack project:

  1. Install cbp-theme
  2. Import cbp-theme using import 'cbp-theme'

This is the error I'm getting:

ERROR in ./~/cbp-theme/dist/js/jquery.inputmask.bundle.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./jquery.inputmask in <truncated>\node_modules\cbp-theme\dist\js
 @ ./~/cbp-theme/dist/js/jquery.inputmask.bundle.js 1369:48-99 1476:48-99 1937:48-99 2294:48-99 2342:48-99

ERROR in ./~/cbp-theme/dist/js/cbp-theme.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./jquery.inputmask in <truncated>\node_modules\cbp-theme\dist\js
 @ ./~/cbp-theme/dist/js/cbp-theme.js 1997:48-97

@d-amit I think the resolution to this issue is to include jquery.inputmask.js in the dist directory or re-work the bundling for jquery.inputmask.bundle.js.
#23 We can fix these issues by moving to Webpack and let it handle the dependency order and inclusion.

@apobbati
Copy link
Contributor Author

I'm going to take this one.

@davezen1
Copy link
Contributor

davezen1 commented Oct 6, 2016

Does this mean we can close this one since #23 is closed?

@d-amit
Copy link
Contributor

d-amit commented Oct 6, 2016

I would like @apobbati to confirm this and then close it out.

@davezen1
Copy link
Contributor

@apobbati can we verify this?

@davezen1 davezen1 assigned tma001 and unassigned davezen1 and d-amit Nov 10, 2016
tma001 added a commit that referenced this issue Nov 22, 2016
-made jQuery external dependency in webpack (looks for global / script tag)
-export cbp-theme.js as UMD module
-added polyfill for ie11 object.asign (for input mask)

See issues #24, #56
tma001 added a commit that referenced this issue Nov 28, 2016
-minify, remove comments from bundles
-reorder script imports in example example kitchen sink app
-added jQuery in 3rd party folder in example kitchen sink app
-made jQuery external dependency in webpack (looks for global / script tag)
-export cbp-theme.js as UMD module
-remove jQuery from package.json dependencies (looking for it as global script var in browser now)

see issues #24, #56, #59
davezen1 pushed a commit that referenced this issue Nov 29, 2016
* fix: webpack build and ie11 issue

-made jQuery external dependency in webpack (looks for global / script tag)
-export cbp-theme.js as UMD module
-added polyfill for ie11 object.asign (for input mask)

See issues #24, #56

* no need to track generated files

* fix: webpack build

-minify, remove comments from bundles
-reorder script imports in example example kitchen sink app
-added jQuery in 3rd party folder in example kitchen sink app
-made jQuery external dependency in webpack (looks for global / script tag)
-export cbp-theme.js as UMD module
-remove jQuery from package.json dependencies (looking for it as global script var in browser now)

see issues #24, #56, #59

* removing jQuery export as we now look to reuse global jQuery from script tag for cbp-theme

* Cleaned up, simplified, and separated README for consumers and developers. Also moved alternative installation methods (webjars/gradle) to separate file.

See issue #57.

* go back to tracking /app/kitchensink/dist for publishing purposes
@davezen1 davezen1 closed this as completed Dec 5, 2016
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