Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Entrypoint undefined = extract-text-webpack-plugin-output-filename after upgrade to webpack 4 #731

Closed
ngohungphuc opened this issue Feb 28, 2018 · 44 comments

Comments

@ngohungphuc
Copy link

ngohungphuc commented Feb 28, 2018

I got this error

code_2018-03-01_00-26-48

My webpack.config file

const path = require("path");
const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const UglifyJSPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
  entry: {
    main: "./wwwroot/frontend/js/main.js"
  },
  output: {
    path: path.resolve(__dirname, "wwwroot/dist"),
    filename: "[name].js",
    publicPath: "/dist/"
  },
  plugins: [
    new ExtractTextPlugin({
      filename: "cmscore.css"
    }),
    new UglifyJSPlugin({
      sourceMap: true
    })
  ],
  module: {
    rules: [
      {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          fallback: "style-loader",
          use: "css-loader!sass-loader"
        })
      },
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,
        use: ["babel-loader", "eslint-loader"]
      }
    ]
  },
  watch: true
};

Am I missing something or webpack 4 is not ready to use with this plugin ?

@RussGlover
Copy link

I have this same issue, it only occurs when webpack mode is set to production.

@AtofStryker
Copy link

Webpack 4's new tapable plugin library broke some of the existing plugins. The fix should be relatively simple

@ngohungphuc
Copy link
Author

I get this error in dev mode not sure about prod mode may be the same lol @RussGlover

@jbasilio
Copy link

jbasilio commented Mar 1, 2018

I have the same issue in Webpack 4. Regardless of mode.

@alexander-akait
Copy link
Member

Somebody can create minimum reproducible test repo?

@mauriciofergo
Copy link

mauriciofergo commented Mar 1, 2018

Same error here,
The build is performed properly but when I enter the local server the entry point is not loaded.
In my case I'm using babel-polyfill (not sure if it's the correct way)

main: ['babel-polyfill', './js/main.js'],

@DaveBitter
Copy link

Same issue here. The fix probably isn't that big of a task. If I had more knowledge on this I would make a PR. Is there any ETA for the fix. I now have to downgrade to Webpack 3 just for this plugin.

@leereichardt
Copy link

Is Webpack 4 even ready for production use? I feel like they need to delay a few more weeks to allow some of the most important plugins to be updated?

@Edward-Lombe
Copy link

@leereichardt After using it for a couple of days, my survey would be no. It still works, but for a program as reliant on plugins as webpack is (especially those under the quasi-official webpack contrib), I would expect the release of v4 to correspond to all the important plugins being updated to v4.

@ngohungphuc
Copy link
Author

@leereichardt

Webpack 4's new tapable plugin library broke some of the existing plugins. The fix should be relatively simple

@leereichardt
Copy link

So it has been said on various issues for the past 50 odd days. Yet this relatively simple fix hasn’t been fixed?

@ngohungphuc
Copy link
Author

not sure why is take so long

@oliverguenther
Copy link

oliverguenther commented Mar 5, 2018

Responding here because I'm being notified of your recent comment. How about instead of complaining here, you contribute by helping in fixing the broken tests in the v4 compatibility PR ?

Thanks to the maintainers that have provided our project with smooth upgrade paths from the early days of webpack. We are experiencing the same issue and will appreciate it being fixed as soon as the maintainers can handle it. If it will take a few days or weeks more, so be it.

@ngohungphuc
Copy link
Author

ngohungphuc commented Mar 5, 2018

We just raise the concern, not complain. Also If I have enough knowledge I would make Pr and fix it for you guys

@AvraamMavridis
Copy link

Same issue here, with webpack 4

screen shot 2018-03-06 at 15 54 17

@alexander-akait
Copy link
Member

We have a lot of issue when webpack@4 was shipped. 😞

Feel free to PR to fix this.

@alexander-akait
Copy link
Member

I can look on ETWP only on next week, sorry

@sukonzer
Copy link

sukonzer commented Mar 9, 2018

sdd

Same issue in Webpack 4. Regardless of mode

@zD98
Copy link

zD98 commented Mar 12, 2018

Maybe entrypoint undefined = xxx is a unfinished feature of webpack 4. ? ? ?

CSS Module Type — CSS as Entry (Goodbye ExtractTextWebpackPlugin)

HTML Module Type — HTML as Entry

And Javascript EntryPoint doesn't have any errors.

@zD98
Copy link

zD98 commented Mar 13, 2018

    stats: {
        ...
        children: false, 
        ...
    },

Setting the property children to false will show off the log info.
But I don't what happened.

@Krucial92
Copy link

Krucial92 commented Mar 14, 2018

Is there any update on this? Any solution to resolve the issue "entrypoint undefined"? Thanks.

@benoitmaudet
Copy link

Same error with webpack 4 : Entrypoint undefined = extract-text-webpack-plugin-output-filename.

@waleedahmed3045
Copy link

Alot of people are having this issue. Can this be resolved please?

@StalkAlex
Copy link

StalkAlex commented Mar 16, 2018

I have experiencing those messages for all non-js entrypoints that I didn't specified myself, like css or html(how I undestand this), but with js entypoint I specified manually it shows correct output Entrypoint main [big] = js/main.3bf77c.js ./css/main.f871d2.css js/main.3bf77c.js.map and it's not causing any real problems, just those messages. Application is working as it suppose to. I'm using last version of webpack and this plugin. So what's real problem with that?
Here's explanation I think.

@polco
Copy link

polco commented Mar 16, 2018

If you're only using the extract-text plugin for CSS, you can use this plugin instead: https://github.com/webpack-contrib/mini-css-extract-plugin

It's compatible with webpack 4.

@mauriciofergo
Copy link

Sorry @maphi88 but I'm not continuing with the migration, good luck!

@GabrielDelepine
Copy link

@mauriciofergo #759 about compatibility section in the README file

@7iomka
Copy link

7iomka commented Mar 24, 2018

@michael-ciniawsky
mini-css-extract-plugin not working for me, because I needed to set publicPath in config.
ETP prodive this posibility

 use: ExtractTextPlugin.extract({
                        publicPath: '../',

But mini-css-extract-plugin has no options(
Any ideas how to fix "Entrypoint undefined = extract-text-webpack-plugin-output-filename" ?

@ngohungphuc
Copy link
Author

@7iomka check my pr to help you config webpack 4
https://github.com/Awesome-CMS-Core/Awesome-CMS-Core/pull/71/files

ZauberNerd added a commit to xing/hops that referenced this issue Mar 26, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-extract-text-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
ZauberNerd added a commit to xing/hops that referenced this issue Mar 27, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-extract-text-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
ZauberNerd added a commit to xing/hops that referenced this issue Mar 27, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-css-extract-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
ZauberNerd added a commit to xing/hops that referenced this issue Mar 27, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-css-extract-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
ZauberNerd added a commit to xing/hops that referenced this issue Mar 27, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-css-extract-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
ZauberNerd added a commit to xing/hops that referenced this issue Mar 27, 2018
extract-text-webpack-plugin will not support webpack 4 and is in
maintenance mode.
recommended alternative is mini-css-extract-plugin:
webpack-contrib/extract-text-webpack-plugin#731 (comment)
@tiendq
Copy link

tiendq commented Apr 2, 2018

mini-css-extract-plugin currently doesn't work with this error:

Module build failed: TypeError: this[NS] is not a function

I'd stay with extract-text-webpack-plugin, it's better to just see a warning :)

@bspatil0001
Copy link

Is this issue closed, Is there a solution for this issue? Moving to other plugin is the only solution.

@AlexGalays
Copy link

When plugins are abandoned before a replacement is fully ready :(

@nicolasxu-bg
Copy link

I still have the same issue.

@tiendq
Copy link

tiendq commented May 21, 2018

I just tried mini-css-extract-plugin again, version 0.4.0 and it works well with SCSS extraction. As authors of extract-text-webpack-plugin has suggested, you'd better to use mini-css-extract-plugin for CSS now :)

@tiendq
Copy link

tiendq commented May 21, 2018

@samboustani what are your problems? did you raise issues?

@mesmerize86
Copy link

Hi @tiendq

Entrypoint mini-css-extract-plugin = *

When i use mini-css-extract-plugin I got above entry point. And it still stop bundling.

{
test: /.(sa|sc|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader',
],
}

new MiniCssExtractPlugin({
  filename: '[name].min.css'
}),

@ngohungphuc
Copy link
Author

Migrate to webpack 4 & extract mini plugins
You guys can take a look here
https://github.com/Awesome-CMS-Core/Awesome-CMS-Core/blob/master/src/AwesomeCMSCore/AwesomeCMSCore/webpack.config.js

@nemanjacosovic
Copy link

+1

@wp-kitten
Copy link

Well done @ngohungphuc , your solution was the only one that worked and helped me not pulling all my hair out. Thanks a lot buddy!

@ngohungphuc
Copy link
Author

@wp-kitten no problem glad that I can help 😄

@bigbizyou
Copy link

Hy !!!
do not forget to exclude node_modules, it was OK for me :

module: {
rules: [
{
test: /.scss$/,
exclude: /node_modules/,
use: ExtractTextWebpackPlugin.extract({
fallback: 'style-loader',
use: [{
loader: 'css-loader',
options: {minimize: true}
}, 'sass-loader', 'postcss-loader', 'import-glob-loader']
})
},

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests