ahmadawais / create-guten-block

📦 A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
https://Awais.dev/cgb-post
MIT License
3.16k stars 329 forks source link

How to add file-loader? #198

Closed mathishuettl closed 5 years ago

mathishuettl commented 5 years ago

Hello,

how can i correctly add file-loader? I cant find a webpack.conf or something when i hit npx create-guten-block.

My aim is to import a png file with import myfile from "./images/test.png"

ahmadawais commented 5 years ago

You can do that in a JS file and it should work. Otherwise, just eject.

mathishuettl commented 5 years ago

i ejected, but since i did that arrow-functions doesnt work anymore.. Unbenannt

juanRabaa commented 4 years ago

You can do that in a JS file and it should work. Otherwise, just eject.

@ahmadawais I can't import images on a clean project using import './img.png. Do I need anything else? I don't see a webpack config file to set up a loader. image

therajuahammad commented 4 years ago

You can do that in a JS file and it should work. Otherwise, just eject.

@ahmadawais I can't import images on a clean project using import './img.png. Do I need anything else? I don't see a webpack config file to set up a loader. image

I'm also facing this problem.