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/...
I'm still confused how to resolve module paths with webpack. Now I write:  myfile = require('../../mydir/myfile.js')    but I'd like to write  myfile = require('mydir/myfile.js')    I was thinking that resolve.alias may help...
Suppose that I have class like this (written in typescript) and I bundle it with webpack into bundle.js.  export class EntryPoint {     static run() {         ...     } }   In my index.html I will include the bundle, but then I would also like to c...
I'm starting out a new vue.js project so I used the vue-cli tool to scaffold out a new webpack project (i.e. vue init webpack).  As I was walking through the generated files I noticed the following imports in the src/router/index.js file:  impo...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.