Skip to content

Instantly share code, notes, and snippets.

@zgordon
Created September 14, 2018 16:17
Show Gist options
  • Save zgordon/0ea52565eb8176a1ee05afa38248445a to your computer and use it in GitHub Desktop.
Save zgordon/0ea52565eb8176a1ee05afa38248445a to your computer and use it in GitHub Desktop.
An example Gutenberg package.json file
{
"name": "cta-block-example",
"version": "1.0.0",
"license": "MIT",
"main": "blocks/index.js",
"scripts": {
"dev": "cross-env BABEL_ENV=default webpack --watch",
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack -p"
},
"devDependencies": {
"@wordpress/babel-preset-default": "^1.2.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4",
"classnames": "^2.2.5",
"cross-env": "^5.1.5",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"extract-text-webpack-plugin": "^3.0.2",
"node-sass": "^4.9.0",
"postcss-loader": "^2.1.5",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.7",
"style-loader": "^0.19.1",
"webpack": "^3.11.0"
}
}
@crs1138
Copy link

crs1138 commented Feb 6, 2020

Hi, I really enjoyed your course and I like your set up. Is there any updated version that wouldn't rely on the deprecated extract-text-webpack-plugin and would be using the latest stable @babel/core? I've tried to reproduce it with mini-css-extract-plugin, but I ran into a dead-end that is beyond my current knowledge. I get the CSS compiled. I get the editor.blocks.js compiled, but the blocks are not there (their script is not getting executed), despite the fact that I can see the file itself is loaded by Wordpress.
Screenshot 2020-02-06 at 16 49 24
Screenshot 2020-02-06 at 16 50 34
Screenshot 2020-02-06 at 16 51 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment