Comments (5)
I just played around a bit more and got the following results:
webpack 0.8.x
plays nicely with enhanced-require 0.4.x
, node-jquery 1.7.x
and (jam
) jquery 1.7.x
. Updating node-jquery
to the latest version (1.8.3
) did not change anything (i.e. it still built flawlessly). When I did the same with jam
's jquery
, though, the above errors reoccured (tried 1.9.0pre
and 1.8.3
). I actually suspected node-jquery
to cause the errors, so that outcome sort of surprised me.
from webpack.
hmm.. i think the problem is that webpack do not respect the jam section in the package.json
"jam": {
"main": "dist/jquery.js",
"include": ["dist/jquery.js"]
}
So it tries to load index.js
which doesn't exist. So it tries node-jquery
with mixed in jam's jquery
... fail...
I'll add support for jam.main as packageMains
.
jam writes a config for require.js which includes the main field. So require.js would work.
from webpack.
So I added jam.main
to the defaults for packageMains.
Your example will build now:
Hash: 434aa3aa5292c1b194270b7b7657b191
Compile Time: 554ms
Chunks: 1
Modules: 7
Modules including duplicates: 7
Modules first chunk: 7
main bundle.js: 272884 chars/bytes
<id> <size> <filename>
bundle.js
0 134 .\main.js
1 445 (webpack)\buildin\__webpack_amd_require.js
2 552 (webpack)\buildin\__webpack_amd_define.js
3 251 (webpack)\buildin\__webpack_module.js
4 24 (webpack)\buildin\__webpack_options_amd.loader.js!(webpack)\buildin\__webpack_options_amd.loader.js
5 151 (webpack)\~\enhanced-require\lib\require.webpack.js
6 269754 .\web_modules\jquery\dist\jquery.js
from webpack.
Hi sokra,
I just tried it in one of my projects and can confirm this works flawlessly. Thank you very much!
Best regards,
miffels
from webpack.
๐
from webpack.
Related Issues (20)
- Webpack build error for second time HOT 1
- `exportsPresence` does not work for unused imports HOT 3
- Implement ability to use "node:" prefixes for Node.js core modules HOT 1
- mangled exports breaks with destructuring assignment of JSON imports HOT 7
- there are confusing JDocs code
- Potential bug issues
- Webpack is not resolving node_modules specified in `resolve.modules` property.
- Dynamically loading chunks
- [Code implementation issues] ArrayQueue
- [feature] create cli HOT 3
- Not able to build node script
- bootstrap:27 Uncaught TypeError: __webpack_require__.nmd is not a function
- Self-reference dependency has unused export name when imported inside of a web worker
- support `import.meta.dirname` and `import.meta.filename` HOT 2
- <!-- identifier: admin-actions -->
- Remote into Web Component from React giving an error saying " Module does not exist in container"
- Multiple DefinePlugin instances cause aggressive cache invalidation due to collisions HOT 7
- Webpack fails when importing module
- import .scss build to js, the exported mapping is inconsistent with the usageใUrgent!!ใ
- Unused code elimination and deduplication is not applied when using sass's api: 'legacy' setting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack.