hi guys , how I do include a custom css file using...
# javascript
j
hi guys , how I do include a custom css file using require? so far I have tried using
require("css/normalize.css")
and
require("./css/normalize.css")
but i'm getting : Module not found: Error: Can't resolve 'css/normalize.css' in '/home/devquilla/repository/ServerCPSVertx/WalletCPS/dashboard/build/kotlin-js-min/main' @ ./dashboard.js 2777:4-32
b
If you're in mpp project you need to copy your processed resources from resources js/main to processedResources
j
no, it's just a JS project.
b
Have you configured css loader via webpack.config.d?
j
config.module.rules.push({ test: /\.(css|sass)$/, use: [ "style-loader", // creates style nodes from JS strings "css-loader", // translates CSS into CommonJS "sass-loader" // compiles Sass to CSS, using Node Sass by default ] });
b
It looks like you need to copy processed resources into js min directory
Build/kotlin-js-min
j
ok, I'll try that