Questions tagged [webpack-3]

Version 3 of the Webpack bundler. Webpack takes modules with dependencies and generates static assets representing those modules.

About

Released in June 2017. Migrating from Webpack 2 to 3 should involve no effort beyond running the upgrade commands in your terminal.

New Features

  • Scope Hoisting
  • Dynamic Import Syntax

Links

GitHub

183 questions
0
votes
1 answer

on webpack external link as require([ "https://maps.googleapis.com/maps/api/js?key="+API_KEI >> getting ModuleNotFoundError

how can I fix that? on webpack external link as require([ "https://maps.googleapis.com/maps/api/js?key="+API_KEI >> getting ModuleNotFoundError
0
votes
2 answers

Can't find variable: numeral

declare let numeral:any; @Component({ //moduleId: module.id, selector: 'app-dashboard', templateUrl: './dashboard.component.html', styleUrls: hboard.component.css' }) I am using Angular2 +…
Jun
  • 3,422
  • 3
  • 28
  • 58
0
votes
1 answer

Karma/Webpack/Vue.js: Property or method is not defined on the instance but referenced during render

I've seen that this question has been asked plenty of times already but in this case I think it's more related to my karma/webpack configuration that on what I'm doing in Vue. That because I only get the warning when running the tests with Karma…
Francesco Casula
  • 26,184
  • 15
  • 132
  • 131
0
votes
1 answer

How to prevent Webpack from removing other files in output path?

Let's say I compile some JS assets to dist/static/js: output: { path: config.build.assetsRoot, filename: utils.assetsPath('js/[name].[chunkhash].js'), chunkFilename: utils.assetsPath('js/[id].[chunkhash].js'), }, Before…
van_folmert
  • 4,257
  • 10
  • 44
  • 89
0
votes
1 answer

.tsx/typescript throws error "TS2307: Cannot find module 'History' only on Ubuntu?

Facing a weird issue with a React/Typescript setup. Running webpack -p on OSX/Windows compiles just fine with no errors from the TypeScript/TSX compiler at all. However, on Ubuntu it will throw a TypeScript specific error, specifically: ERROR in…
cbll
  • 6,499
  • 26
  • 74
  • 117
0
votes
1 answer

React Router can't configure URLs on localhost and remote. Receiving 404 not found error

I've encountered weird situation. I believe that the issue is related to React Router V4 configuration. I'm using the react-router-modal and React Router v4. With react-router-modal component I render a link to a modal window which have it's own…
Kuzma
  • 679
  • 1
  • 12
  • 36
0
votes
1 answer

Webpack 3 + PostCSS does not hotloading when changed css file of @import

Here is my css webpack config { test: /\.css$/, use: [ { loader: 'style-loader', }, { loader: 'css-loader', options: { sourceMap: true, importLoaders: 1 } }, { loader: 'postcss-loader', options:…
R.R
  • 847
  • 1
  • 9
  • 20
0
votes
1 answer

Webpack: How to merge css and less, THEN apply cssnano

I managed to compile my css and less resources („imported“ from javascript) to all-my-LESS|CSS, extract them using ExtractTextPlugin and merge them together with MergeFilesPlugin to combinedStyles.css. The bit I am missing: How to run cssnano (e.g.…
Frank N
  • 9,625
  • 4
  • 80
  • 110
0
votes
0 answers

Webpack extract text plugin not generating a separate CSS file?

I have one src/styles/main.scss file which I want to convert to build/styles/main.css and then use it in index.html. I have been trying to setup webpack with text extractor plugin but unable to achieve the final result. This is my directory…
Sahil
  • 3,338
  • 1
  • 21
  • 43
0
votes
1 answer

Webpack throws TypeError: Super expression must either be null or a function, not undefined when importing LESS file

I have the following in a file initialize.js: import App from './components/App'; import './styles/application.less'; document.addEventListener('DOMContentLoaded', () => { const app = new App(); app.start(); }); In webpack.config.js I…
Danziger
  • 19,628
  • 4
  • 53
  • 83
0
votes
1 answer

html-webpack-plugin is only injecting js in root route?

Using the Html-webpack-plugin if I go to the root directory localhost:8080 it injects the javascript as expected If I go localhost:8080/test the html renders but no js gets injected server.js app.use('/', express.static(__dirname +…
Paul Brunache
  • 605
  • 11
  • 21
0
votes
1 answer

webpack - output.filename error

I know this is a common question for webpack; it's really hard to debug something if it won't give you any information about the cause or location of the error. I'm getting the error: Error: 'output.filename' is required, either in config file or as…
twils0
  • 2,431
  • 2
  • 12
  • 24
0
votes
1 answer

Webpack3: require inside exported module not working

When trying to access a module I created util.js inside of a file where I use module.exports in webpack, it results in an empty object at build time. In the image below, my const utils = require(...) returns an empty object. However, when I inspect…
Clifford Fajardo
  • 1,357
  • 1
  • 17
  • 28
0
votes
1 answer

Can't import a module in my crafted module

I did a slider on mobx and bundle it using webpack 3. I excluded mobx from slider's bundle using "externals". Then I published it as package, created a mobx-sandbox and installed the slider there. In result I'm getting an error because package…
Curious
  • 63
  • 6
0
votes
1 answer

Webpack 3: css-loader style-loader error

I am receiving the following error: ERROR in ./common/app.css Module parse failed: E:\universal-starter\common\app.css Unexpected token (1:5) You may need an appropriate loader to handle this file type. | body { | background-color:…
user1177440
1 2 3
12
13