Questions tagged [webpack-4]

Use this tag for questions specific to features in Webpack 4. When using this tag, also include the more generic [webpack] tag where possible.

Use this tag for questions specific to features in Webpack 4. For general Webpack questions, the correct tag is .

Webpack 4 Big changes:

  • 4 is no longer supported.
  • configuration modes (--mode): production or development
  • configuration updates (plugins substitution by optimization config.)
    • NoEmitOnErrorsPlugin -> optimization.noEmitOnErrors
    • ModuleConcatenationPlugin -> optimization.concatenateModules
    • NamedModulesPlugin -> optimization.namedModules
    • CommonsChunkPlugin was removed -> optimization.splitChunks, optimization.runtimeChunk
  • native support
    • add type: "javascript/auto" when transforming JSON via loader to JS

Links

1410 questions
0
votes
0 answers

SCSS not loading in webpack4 Development Build

I am trying to migrate my application from Webpack3 to Webpack4. I am facing issue in dev build.SCSS files or not merging in dev build and its not loading.Please find below my webpack dev configuration.I used mini-css-extract-plugin instead of…
Hariharan Subramanian
  • 1,360
  • 2
  • 12
  • 22
0
votes
1 answer

rendering css by environment

I'm looking to switch to webpack on an asp.net mvc website and there's 3 different environments of this website and each environment has their own color scheme (so people know what environment they're on) so I need a way to tell webpack which css…
Eman
  • 1,093
  • 2
  • 26
  • 49
0
votes
1 answer

Error: No PostCSS Config found in '/home/react-project/workarea/scss'

I am trying to load scss files in my reactjs app using webpack. Here is my webpack code: module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader' }, }, { test: /\.(sa|sc|c)ss$/, …
Vinayak humberi
  • 191
  • 3
  • 8
0
votes
0 answers

webpack 4 + babel 6 + ES Module and Script consumption

I'm trying to create a library that could be used using one of following method: import MyLibrary from 'mylibrary'; const instance = new Mylibrary(); and