Skip to content

Commit

Permalink
fix: webpack4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Nov 23, 2018
1 parent 66ec071 commit c6c6f3e
Show file tree
Hide file tree
Showing 6 changed files with 447 additions and 138 deletions.
3 changes: 0 additions & 3 deletions apikeys.js.default

This file was deleted.

6 changes: 3 additions & 3 deletions exercises/autocomplete-sfc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

<head>
<title>Tasks via Generator Function</title>
<link rel="stylesheet" href="./assets/styles.css">
<link rel="stylesheet" href="/assets/styles.css">
</head>

<body>
<div id='root'>

</div>
<script src="./assets/main.js"></script>
<script src="/assets/main.js"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion exercises/autocomplete-sfc/tests/task.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ReactElement } from 'react';
let hasStudentSolution: boolean = true;

hasStudentSolution =
JSON.stringify(renderer.create(<PlaceSearchResult />).toTree()) !==
JSON.stringify(renderer.create(<PlaceSearchResult />).toJSON()) !==
JSON.stringify({
nodeType: 'component',
props: {},
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
"semantic-release": "semantic-release"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@mike-works/js-lib-renovate-config": "2.0.0",
"@mike-works/workshop-semantic-release-config": "1.0.0",
"@types/chalk": "2.2.0",
"@types/html-webpack-plugin": "3.2.0",
"@types/jest": "23.3.9",
"@types/react": "16.7.3",
"@types/react-dom": "16.0.9",
"@types/react": "^15.0.0",
"@types/react-dom": "^15.0.0",
"@types/react-hot-loader": "4.1.0",
"@types/react-test-renderer": "16.0.3",
"@types/react-test-renderer": "^15.0.0",
"@types/webpack-env": "1.13.6",
"awesome-typescript-loader": "5.2.1",
"babel-core": "6.26.3",
Expand All @@ -33,14 +34,14 @@
"babel-preset-env": "1.7.0",
"css-loader": "1.0.1",
"express": "4.16.4",
"extract-text-webpack-plugin": "3.0.2",
"extract-text-webpack-plugin": "4.0.0-beta.0",
"http-proxy-middleware": "0.19.0",
"jest": "23.6.0",
"node-sass": "4.10.0",
"react": "16.6.1",
"react-dom": "16.6.1",
"react": "15.0.0",
"react-dom": "15.0.0",
"react-test-render": "1.1.1",
"react-test-renderer": "16.6.1",
"react-test-renderer": "^15.0.0",
"react-transform-catch-errors": "1.0.2",
"react-transform-hmr": "1.0.4",
"rimraf": "2.6.2",
Expand Down
22 changes: 11 additions & 11 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const path = require("path");
const webpack = require("webpack");
const path = require('path');
const webpack = require('webpack');

const plugins = require("./webpack/plugins");
const entries = require("./webpack/entries");
const resolve = require("./webpack/resolve");
const mod = require("./webpack/module");
const exercises = require("./webpack/exercises");
const plugins = require('./webpack/plugins');
const entries = require('./webpack/entries');
const resolve = require('./webpack/resolve');
const mod = require('./webpack/module');
const exercises = require('./webpack/exercises');

module.exports = function(env) {
return {
devtool: "cheap-source-maps",
devtool: 'cheap-source-maps',
context: exercises.exercisePath(env),
entry: entries(env),
mode: 'development',
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
publicPath: "/assets/"
path: path.join(__dirname, 'dist'),
publicPath: '/assets/'
},
plugins: plugins(env),
module: mod(env),
Expand Down
Loading

0 comments on commit c6c6f3e

Please # to comment.