Ant Design - Works if built but not with Webpack Dev ServerStylesheet not loaded because of MIME-typeresolving font path in scss file when using webpackWebpack not extracting CSS into files from vendor vue componentsHow to fix HTML file comments not being ignored by Webpack Dev Server?how to configure Ant Design with Webpack 3Webpack3 import bootstrap and other librariesWebpack 4 - Style-loader/url not workingVueJS + WebpackSimple not compiling SASSWebpack style-loader / css-loader: url() path resolution not workingWebpack css issue, missing bundle.cssUsing webpack-dev-server 3 with parallel-webpack

Is it legal in the UK for politicians to lie to the public for political gain?

Identification quotas - TIKZ LaTeX

How is TD(0) method helpful? What good does it do?

What can plausibly explain many of my very long and low-tech bridges?

Pay as you go Or Oyster card

Dynamically loading CSS files based on URL or URI in PHP

Will TSA allow me to carry a Continuous Positive Airway Pressure (CPAP)/sleep apnea device?

Short story written from alien perspective with this line: "It's too bright to look at, so they don't"

How to make a setting relevant?

Traffic law UK, pedestrians

How would you say “AKA/as in”?

Building a road to escape Earth's gravity by making a pyramid on Antartica

If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?

What risks are there when you clear your cookies instead of logging off?

What is the right way to float a home lab?

Accidentally renamed tar.gz file to a non tar.gz file, will my file be messed up

Importance sampling estimation of power function

Through what methods and mechanisms can a multi-material FDM printer operate?

What is the purpose of building foundations?

How do photons get into the eyes?

How can drunken, homicidal elves successfully conduct a wild hunt?

What's the correct term for a waitress in the Middle Ages?

How to supress loops in a digraph?

What is the advantage of carrying a tripod and ND-filters when you could use image stacking instead?



Ant Design - Works if built but not with Webpack Dev Server


Stylesheet not loaded because of MIME-typeresolving font path in scss file when using webpackWebpack not extracting CSS into files from vendor vue componentsHow to fix HTML file comments not being ignored by Webpack Dev Server?how to configure Ant Design with Webpack 3Webpack3 import bootstrap and other librariesWebpack 4 - Style-loader/url not workingVueJS + WebpackSimple not compiling SASSWebpack style-loader / css-loader: url() path resolution not workingWebpack css issue, missing bundle.cssUsing webpack-dev-server 3 with parallel-webpack






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have a new React project and would like to use
Ant Design Components



The components already work, but only if I build the whole project file. So with yarn build it works, but the webpack dev server I created does not serve the CSS.



The CSS won't be loaded. Error in console:



Refused to apply style from 'http://127.0.0.1:3999/~antd/dist/antd.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.



Already had a look at Stylesheet not loaded because of MIME-type but could not find the right solution.



This is how my webpack.config.js looks like:






const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = (env = ) => ( 'development',
devtool: 'eval',
resolve:
extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
,
plugins: [
new CopyWebpackPlugin([
from: 'dev/static/',
to: 'static/'
,
'dev/index.html',
]),
],
module:
rules: [
enforce: 'pre',
test: [/.js$/, /.jsx$/],
exclude: /node_modules/,
loader: 'eslint-loader',
options:
failOnError: env === 'production',
,
,

test: [/.js$/, /.jsx$/],
exclude: /node_modules/,
use: 'babel-loader',
,

test: [/.css$/g, /.sass$/g, /.scss$/g],
use: [
loader: 'css-hot-loader',
,

loader: 'file-loader',
options:
name: 'kt-infoscreen.css',
,
,

loader: 'sass-loader',
options:
includePaths: ['./node_modules'],
outputStyle: env === 'production' ? 'compressed' : 'nested',
,
,
],
,
],
,
watchOptions:
poll: 1500,
,
devServer:
contentBase: path.resolve(__dirname, './dev/'),
watchContentBase: true,
disableHostCheck: true,
host: '127.0.0.1',
port: 3999,
// public: process.env.webpack_public_address ,
);





Can someone help here ?



As I said, the created yarn build file completely works it's only the webpack-dev server that does not work.










share|improve this question




























    0















    I have a new React project and would like to use
    Ant Design Components



    The components already work, but only if I build the whole project file. So with yarn build it works, but the webpack dev server I created does not serve the CSS.



    The CSS won't be loaded. Error in console:



    Refused to apply style from 'http://127.0.0.1:3999/~antd/dist/antd.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.



    Already had a look at Stylesheet not loaded because of MIME-type but could not find the right solution.



    This is how my webpack.config.js looks like:






    const path = require('path');
    const CopyWebpackPlugin = require('copy-webpack-plugin');

    module.exports = (env = ) => ( 'development',
    devtool: 'eval',
    resolve:
    extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
    ,
    plugins: [
    new CopyWebpackPlugin([
    from: 'dev/static/',
    to: 'static/'
    ,
    'dev/index.html',
    ]),
    ],
    module:
    rules: [
    enforce: 'pre',
    test: [/.js$/, /.jsx$/],
    exclude: /node_modules/,
    loader: 'eslint-loader',
    options:
    failOnError: env === 'production',
    ,
    ,

    test: [/.js$/, /.jsx$/],
    exclude: /node_modules/,
    use: 'babel-loader',
    ,

    test: [/.css$/g, /.sass$/g, /.scss$/g],
    use: [
    loader: 'css-hot-loader',
    ,

    loader: 'file-loader',
    options:
    name: 'kt-infoscreen.css',
    ,
    ,

    loader: 'sass-loader',
    options:
    includePaths: ['./node_modules'],
    outputStyle: env === 'production' ? 'compressed' : 'nested',
    ,
    ,
    ],
    ,
    ],
    ,
    watchOptions:
    poll: 1500,
    ,
    devServer:
    contentBase: path.resolve(__dirname, './dev/'),
    watchContentBase: true,
    disableHostCheck: true,
    host: '127.0.0.1',
    port: 3999,
    // public: process.env.webpack_public_address ,
    );





    Can someone help here ?



    As I said, the created yarn build file completely works it's only the webpack-dev server that does not work.










    share|improve this question
























      0












      0








      0








      I have a new React project and would like to use
      Ant Design Components



      The components already work, but only if I build the whole project file. So with yarn build it works, but the webpack dev server I created does not serve the CSS.



      The CSS won't be loaded. Error in console:



      Refused to apply style from 'http://127.0.0.1:3999/~antd/dist/antd.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.



      Already had a look at Stylesheet not loaded because of MIME-type but could not find the right solution.



      This is how my webpack.config.js looks like:






      const path = require('path');
      const CopyWebpackPlugin = require('copy-webpack-plugin');

      module.exports = (env = ) => ( 'development',
      devtool: 'eval',
      resolve:
      extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
      ,
      plugins: [
      new CopyWebpackPlugin([
      from: 'dev/static/',
      to: 'static/'
      ,
      'dev/index.html',
      ]),
      ],
      module:
      rules: [
      enforce: 'pre',
      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      loader: 'eslint-loader',
      options:
      failOnError: env === 'production',
      ,
      ,

      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      use: 'babel-loader',
      ,

      test: [/.css$/g, /.sass$/g, /.scss$/g],
      use: [
      loader: 'css-hot-loader',
      ,

      loader: 'file-loader',
      options:
      name: 'kt-infoscreen.css',
      ,
      ,

      loader: 'sass-loader',
      options:
      includePaths: ['./node_modules'],
      outputStyle: env === 'production' ? 'compressed' : 'nested',
      ,
      ,
      ],
      ,
      ],
      ,
      watchOptions:
      poll: 1500,
      ,
      devServer:
      contentBase: path.resolve(__dirname, './dev/'),
      watchContentBase: true,
      disableHostCheck: true,
      host: '127.0.0.1',
      port: 3999,
      // public: process.env.webpack_public_address ,
      );





      Can someone help here ?



      As I said, the created yarn build file completely works it's only the webpack-dev server that does not work.










      share|improve this question














      I have a new React project and would like to use
      Ant Design Components



      The components already work, but only if I build the whole project file. So with yarn build it works, but the webpack dev server I created does not serve the CSS.



      The CSS won't be loaded. Error in console:



      Refused to apply style from 'http://127.0.0.1:3999/~antd/dist/antd.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.



      Already had a look at Stylesheet not loaded because of MIME-type but could not find the right solution.



      This is how my webpack.config.js looks like:






      const path = require('path');
      const CopyWebpackPlugin = require('copy-webpack-plugin');

      module.exports = (env = ) => ( 'development',
      devtool: 'eval',
      resolve:
      extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
      ,
      plugins: [
      new CopyWebpackPlugin([
      from: 'dev/static/',
      to: 'static/'
      ,
      'dev/index.html',
      ]),
      ],
      module:
      rules: [
      enforce: 'pre',
      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      loader: 'eslint-loader',
      options:
      failOnError: env === 'production',
      ,
      ,

      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      use: 'babel-loader',
      ,

      test: [/.css$/g, /.sass$/g, /.scss$/g],
      use: [
      loader: 'css-hot-loader',
      ,

      loader: 'file-loader',
      options:
      name: 'kt-infoscreen.css',
      ,
      ,

      loader: 'sass-loader',
      options:
      includePaths: ['./node_modules'],
      outputStyle: env === 'production' ? 'compressed' : 'nested',
      ,
      ,
      ],
      ,
      ],
      ,
      watchOptions:
      poll: 1500,
      ,
      devServer:
      contentBase: path.resolve(__dirname, './dev/'),
      watchContentBase: true,
      disableHostCheck: true,
      host: '127.0.0.1',
      port: 3999,
      // public: process.env.webpack_public_address ,
      );





      Can someone help here ?



      As I said, the created yarn build file completely works it's only the webpack-dev server that does not work.






      const path = require('path');
      const CopyWebpackPlugin = require('copy-webpack-plugin');

      module.exports = (env = ) => ( 'development',
      devtool: 'eval',
      resolve:
      extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
      ,
      plugins: [
      new CopyWebpackPlugin([
      from: 'dev/static/',
      to: 'static/'
      ,
      'dev/index.html',
      ]),
      ],
      module:
      rules: [
      enforce: 'pre',
      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      loader: 'eslint-loader',
      options:
      failOnError: env === 'production',
      ,
      ,

      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      use: 'babel-loader',
      ,

      test: [/.css$/g, /.sass$/g, /.scss$/g],
      use: [
      loader: 'css-hot-loader',
      ,

      loader: 'file-loader',
      options:
      name: 'kt-infoscreen.css',
      ,
      ,

      loader: 'sass-loader',
      options:
      includePaths: ['./node_modules'],
      outputStyle: env === 'production' ? 'compressed' : 'nested',
      ,
      ,
      ],
      ,
      ],
      ,
      watchOptions:
      poll: 1500,
      ,
      devServer:
      contentBase: path.resolve(__dirname, './dev/'),
      watchContentBase: true,
      disableHostCheck: true,
      host: '127.0.0.1',
      port: 3999,
      // public: process.env.webpack_public_address ,
      );





      const path = require('path');
      const CopyWebpackPlugin = require('copy-webpack-plugin');

      module.exports = (env = ) => ( 'development',
      devtool: 'eval',
      resolve:
      extensions: ['.js', '.jsx', '.css', '.sass', '.scss'],
      ,
      plugins: [
      new CopyWebpackPlugin([
      from: 'dev/static/',
      to: 'static/'
      ,
      'dev/index.html',
      ]),
      ],
      module:
      rules: [
      enforce: 'pre',
      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      loader: 'eslint-loader',
      options:
      failOnError: env === 'production',
      ,
      ,

      test: [/.js$/, /.jsx$/],
      exclude: /node_modules/,
      use: 'babel-loader',
      ,

      test: [/.css$/g, /.sass$/g, /.scss$/g],
      use: [
      loader: 'css-hot-loader',
      ,

      loader: 'file-loader',
      options:
      name: 'kt-infoscreen.css',
      ,
      ,

      loader: 'sass-loader',
      options:
      includePaths: ['./node_modules'],
      outputStyle: env === 'production' ? 'compressed' : 'nested',
      ,
      ,
      ],
      ,
      ],
      ,
      watchOptions:
      poll: 1500,
      ,
      devServer:
      contentBase: path.resolve(__dirname, './dev/'),
      watchContentBase: true,
      disableHostCheck: true,
      host: '127.0.0.1',
      port: 3999,
      // public: process.env.webpack_public_address ,
      );






      javascript webpack webpack-dev-server webpack-4






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 14:20









      GutelaunetypGutelaunetyp

      205111




      205111






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324751%2fant-design-works-if-built-but-not-with-webpack-dev-server%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55324751%2fant-design-works-if-built-but-not-with-webpack-dev-server%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현