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...
I am trying to use Webpack with Babel to compile ES6 assets, but I am getting the following error message:  You may need an appropriate loader to handle this file type. | import React from 'react'; | /* | import { render } from 'react-d...
I'm going to import this d3gauge.js file into one of my angular2 component, memmon.component.ts file.   import '../../../../js/d3gauge.js'; export class MemMonComponent {     createMemGauge() {         new drawGauge(this.opt);  //drawGa...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.