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;
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.
javascript webpack webpack-dev-server webpack-4
add a comment |
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.
javascript webpack webpack-dev-server webpack-4
add a comment |
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.
javascript webpack webpack-dev-server webpack-4
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
javascript webpack webpack-dev-server webpack-4
asked Mar 24 at 14:20
GutelaunetypGutelaunetyp
205111
205111
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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