Last active
September 5, 2019 03:23
-
-
Save mt8/feb4ca6b4e57ba6747c7418af10e4b10 to your computer and use it in GitHub Desktop.
Block Editor Handbook やるときのwebpack設定など
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ | |
"@babel/preset-env", | |
"@babel/preset-react" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "gutenberg_examples", | |
"version": "1.0.0", | |
"description": "", | |
"main": "block.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"@babel/core": "^7.5.5", | |
"@babel/preset-env": "^7.5.5", | |
"@babel/preset-react": "^7.0.0", | |
"babel-loader": "^8.0.6", | |
"webpack": "^4.39.3", | |
"webpack-cli": "^3.3.7" | |
}, | |
"dependencies": {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
mode: "development", | |
context: __dirname, | |
entry: './block.esnext.js', | |
output: { | |
path: __dirname, | |
filename: "block.js" | |
}, | |
module: { | |
rules: [{ | |
exclude: /node_modules/, | |
loader: 'babel-loader', | |
}], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こんな階層で作業する感じです。