The import statements

The following code demonstrates the Webpack loaders in action:

// This is loaded using the css-loader dependency:
import './styles.css';

// This is loaded using the cpp-wasm-loader dependency:
import wasm from './main.c';

// These are loaded using the file-loader dependency:
import backgroundImage from './assets/background.jpg';
import spaceshipImage from './assets/spaceship.svg';

The loaders we configured in the webpack.config.js file understand how to handle CSS, C, and image files. Now that we have the required resources available, we can start defining our component state.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset