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'm not sure what part of t...
I'm using Webpack in my application, in which I create two entry points - bundle.js for all my JavaScript files/codes, and vendors.js for all libraries like jQuery and React. What do I do in order to use plugins which have jQuery as their depen...
I'm trying to convert an angular app from gulp to webpack. in gulp I use gulp-preprocess to replace some variables in the html page (e.g. database name) depending on the NODE_ENV. What is the best way of achieving a similar result with webpack?...
I am using create-react-app. I am trying to call an image from my public folder from a file inside my src/components. I am receiving this error message.     ./src/components/website_index.js Module not found: You attempted to   import ../../public/...
Hello is there anyway you can stop moment.js from loading all the locales(I just need english) when your using webpack? I'm looking at the source it seems that if hasModule is defined which  it is for webpack then it always tries to require() e...
I'm new to webpack, and I need a hand in setting up to generate sourcemaps. I'm running webpack serve from the command line, which compiles successfully. But I really need sourcemaps. This is my webpack.config.js.  var webpack = require(...
I am currently using ES6 in an React app via webpack/babel. I am using index files to gather all components of a module and export them. Unfortunately, that looks like this:  import Comp1_ from './Comp1.jsx'; import Comp2_ from './Comp2...
OK, i have searched high and low but cannot reliably deterrmine if this is or is not possible with webpack.  https://github.com/webpack/webpack/tree/master/examples/require.context Appears to indicate that one can pass a string to a function and it...
I'm using arrow functions and I'm debugging with Chrome and Firefox Dev Tool. I am getting, this as undefined, even though the code still works.   My assumption is, that it has something to do with source-maps.  Here are the tools I use in...
I'm trying to do something that I believe should be possible, but I really can't understand how to do it just from the webpack documentation.  I am writing a JavaScript library with several modules that may or not depend on each other. On t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.