WelcomeBtn. On this page, we’ll add a Welcome! button using the following code: Ĭlicking the Welcome! button calls main.js: const greeting = require("./greeting.js") Ĭonst welcomeBtn = document.getElementById("welcomeBtn") Ĭonst welcomeMsg = document.getElementById("welcomeMsg") To create a file, select the project root folder my_webpack_app, right-click on it and select New | HTML File or New | JavaScript File from the context menu. Now let’s create the JavaScript files main.js and greetings.js, and an index.html file that references main.js. Once you click Create, an empty project will be generated and opened in WebStorm. In the New Project dialog, select Empty Project and specify the name of the project. We’ll start by opening WebStorm and clicking New Project on the Welcome screen.
0 Comments
Leave a Reply. |