浏览代码

Added webpack

development
Safet Purkovic 4 年前
父节点
当前提交
a74df0d34d
共有 4 个文件被更改,包括 14 次插入2 次删除
  1. 2
    1
      .gitignore
  2. 2
    1
      package.json
  3. 1
    0
      src/index.js
  4. 9
    0
      webpack.config.js

+ 2
- 1
.gitignore 查看文件

@@ -1 +1,2 @@
node_modules/
node_modules/
dist/

+ 2
- 1
package.json 查看文件

@@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
"repository": {
"type": "git",

+ 1
- 0
src/index.js 查看文件

@@ -0,0 +1 @@
console.log('hello world')

+ 9
- 0
webpack.config.js 查看文件

@@ -0,0 +1,9 @@
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index.js",
output: {
filename: "main.js",
path: path.resolve(__dirname,"./dist")
}
}

正在加载...
取消
保存