Skip to content

Commit f2755a8

Browse files
authored
Merge pull request #12 from code-dot-org/webpack4
re-apply Upgrade to webpack 4
2 parents b5cc0a1 + a9fedab commit f2755a8

File tree

3 files changed

+9
-30
lines changed

3 files changed

+9
-30
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Icon?
3939
/.cake_task_cache
4040

4141
# Build files
42-
/lib
42+
/dist
4343
/demo/dist
4444

4545
# VScode settings

package.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
"name": "@code-dot-org/maze",
33
"version": "1.1.0",
44
"description": "standalone project for the Maze app type",
5-
"files": [
6-
"lib/maze.js"
7-
],
8-
"main": "lib/maze.js",
5+
"main": "dist/main.js",
96
"scripts": {
107
"build": "webpack -p",
11-
"build:dev": "webpack --progress --colors",
12-
"build:demo": "webpack --config demo/webpack.config.js",
8+
"build:dev": "webpack --progress --colors --mode=development",
9+
"build:demo": "webpack --config demo/webpack.config.js -p",
1310
"lint": "eslint --ext .js src/ test",
1411
"postversion": "git push && git push --tags && npm publish",
1512
"preversion": "npm run test",
@@ -29,7 +26,7 @@
2926
"babel-core": "^6.26.0",
3027
"babel-eslint": "^8.0.3",
3128
"babel-jest": "^22.1.0",
32-
"babel-loader": "^7.1.2",
29+
"babel-loader": "^7.1.4",
3330
"babel-plugin-add-module-exports": "^0.2.1",
3431
"babel-plugin-transform-class-properties": "^6.23.0",
3532
"babel-plugin-transform-es2015-classes": "^6.9.0",
@@ -38,12 +35,11 @@
3835
"codecov": "^3.0.0",
3936
"eslint": "^3.19.0",
4037
"eslint-plugin-babel": "^4.1.2",
41-
"file-loader": "^1.1.6",
42-
"html-webpack-plugin": "^2.30.1",
38+
"file-loader": "^1.1.11",
39+
"html-webpack-plugin": "^3.2.0",
4340
"jest": "^22.1.3",
44-
"prop-types": "^15.6.0",
45-
"webpack": "^3.8.1",
46-
"webpack-dev-server": "^2.9.5"
41+
"webpack": "^4.8.1",
42+
"webpack-cli": "^2.1.3"
4743
},
4844
"jest": {
4945
"coverageDirectory": "./coverage/",

webpack.config.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
1-
const path = require("path");
2-
const name = "maze";
3-
41
module.exports = {
5-
entry: './src/index.js',
62
output: {
7-
path: path.resolve(__dirname, "lib"),
8-
filename: name + ".js",
9-
library: name,
103
libraryTarget: 'umd',
11-
umdNamedDefine: true
124
},
13-
target: 'node',
145
module: {
156
rules: [{
167
test: /\.js$/,
178
loader: "babel-loader",
189
}]
1910
},
20-
resolve: {
21-
extensions: [".js"],
22-
},
23-
stats: {
24-
colors: true
25-
},
26-
devtool: 'source-map',
27-
devServer: { inline: true }
2811
};

0 commit comments

Comments
 (0)