Questions tagged [webpack]
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it can also transform, bundle, or package just about any resource or asset. Webpack takes modules with dependencies and generates static assets representing those modules. Webpack enables extensibility and promotes best practices in web architecture and performance.
webpack
42,803
questions
4
votes
2
answers
3k
views
Webpack causes syntax error in bundle output
I've been struggling for a while now with a problem that I believe is caused by Webpack.
Essentially, I have a Node-based app that I'm bundling up with Webpack to serve to the client (it's a ReactJS ...
1
vote
1
answer
2k
views
Webpack bundle validates but node server throwing syntax error
I am using webpack to bundle/transform jsx.
From the command line I'm running "webpack --watch". This creates my bundle without errors. Here's my webpack config and Application.js
'use strict';
var ...
144
votes
5
answers
19k
views
Javascript object bracket notation ({ Navigation } =) on left side of assign
I haven't seen this syntax before and am wondering what it's all about.
var { Navigation } = require('react-router');
The brackets on the left are throwing a syntax error:
unexpected token {
I'...
33
votes
1
answer
28k
views
How can I setup webpack to minify and combine scss and javascript like CodeKit?
I'm having trouble using webpack instead of Codekit v1.9.3. I started working to move from CodeKit to Grunt and Gulp, and then learned about webpack which sounds very cool. I just can't seem to get it ...
4
votes
3
answers
7k
views
webpack-dev-middleware does not compile output into folder
I'm using webpack-dev-middleware in my server to compile javascript like this:
if (development){
app.use(webpackMiddleware(webpack({ ...
0
votes
1
answer
62
views
Component based development, should component be frameworkless.
Scenario is a business component based web development team. Components are developed by different team members sharing common understanding of how the component system should work.
One solution is ...
13
votes
4
answers
25k
views
Webpack-dev-server with bypass proxy
How to achieve a 'proxy' (similar to grunt-connect-proxy) option with webpack-dev-server ?
I am using webpack and webpack-dev-server with Grunt. A task in Gruntfile.js (below code) is able to start ...
24
votes
2
answers
16k
views
Webpack: expressing module dependency
I'm trying to require the bootstrap-webpack module in my webpacked application.
It appears to need jQuery, since the bundled javascript then throws the following:
Uncaught ReferenceError: jQuery is ...
126
votes
31
answers
109k
views
webpack --watch isn't compiling changed files
I tried running webpack --watch and after editing my JS files, it doesn't trigger an auto-recompilation.
I've tried reinstalling webpack using npm uninstall but it's still not working.
Any ideas?
5
votes
1
answer
2k
views
Can't include jQuery Datatables via webpack bower components
require('datatables'); does not work
I'm having a hard time trying to include jQuery-Datatables as a webpack module from bower, the current settings work with other bower components, here part of the ...
117
votes
9
answers
147k
views
Webpack Dev Server running on HTTPS/Web Sockets Secure
Normally in developer mode Webpack runs using HTTP. There is usually a web server serving content through HTTP and webpack using http/websockets on a separate port.
Is it possible to run the web ...
16
votes
3
answers
12k
views
Simple solution to share modules loaded via NPM across multiple Browserify or Webpack bundles
Pulling my hair out here looking for a simple solution to share code, required via NPM, across multiple Browserify or Webpack bundles. Thinking, is there such a thing as a file "bridge"?
This isn't ...
6
votes
2
answers
497
views
Accessing soundcloud's lib/audiomanager via on-page JS
I maintain a greasemonkey script that monitors the current track playing as well as the progress on Soundcloud. Previously, I could just do require("lib/audiomanager") to get access to an object that ...
0
votes
1
answer
5k
views
less-loader issue with webpack
I have an issue with loading flat-ui.less from the module. Need help.
I require flat-ui like this require('flat-ui/less/flat-ui.less'); Also the versions for each related loader are "less-loader": "^...
9
votes
2
answers
9k
views
AngularJS and Webpack Integration
I am looking for some help with using webpack for a large AngularJS application. We are using folder structure based on feature (each feature/page has a module and they have controllers, directives). ...