Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - upgrade to webpack 5 #11326

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/backgrounds/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/cssresources/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/design-assets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"tmp": "^0.2.1",
"tslib": "^2.0.0",
"web-component-analyzer": "^1.0.3",
"webpack": "^4.33.0",
"webpack": "5.0.0-beta.17",
"zone.js": "^0.10.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion addons/events/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/google-analytics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
4 changes: 2 additions & 2 deletions addons/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"@babel/plugin-transform-classes": "^7.9.2",
"@storybook/addons": "6.0.0-beta.31",
"@storybook/api": "6.0.0-beta.31",
"@types/webpack": "^4.41.9",
"babel-loader": "^8.0.6",
"core-js": "^3.0.1",
"global": "^4.3.2",
"graphiql": "^0.17.5",
"graphql": "^15.0.0",
"prop-types": "^15.7.2",
"regenerator-runtime": "^0.13.3",
"webpack": "^4.43.0"
"@types/webpack-env": "^1.15.2",
"webpack": "5.0.0-beta.17"
},
"peerDependencies": {
"react": "*",
Expand Down
5 changes: 3 additions & 2 deletions addons/graphql/src/preset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { join } from 'path';
import { ContextReplacementPlugin, Configuration } from 'webpack';

const { join } = require('path');

export const managerWebpack = async (config: Configuration) => {
// See https://github.com/graphql/graphql-language-service/issues/111#issuecomment-306723400

Expand All @@ -12,7 +13,7 @@ export const managerWebpack = async (config: Configuration) => {
test: /\.js$/,
use: [
{
loader: require.resolve('babel-loader'),
loader: require.resolve('babel-loader').toString(),
options: {
sourceType: 'unambiguous',
plugins: [[require.resolve('@babel/plugin-transform-classes'), { loose: true }]],
Expand Down
2 changes: 1 addition & 1 deletion addons/graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/jest/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/knobs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"strict": true,
"noUnusedLocals": true
},
Expand Down
2 changes: 1 addition & 1 deletion addons/links/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/queryparams/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/storysource/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion addons/viewport/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": [
"src/**/*"
Expand Down
4 changes: 2 additions & 2 deletions app/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/webpack-env": "^1.15.2",
"autoprefixer": "^9.7.6",
"core-js": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"fork-ts-checker-webpack-plugin": "^5.0.1",
"global": "^4.3.2",
"postcss-loader": "^3.0.0",
"react": "^16.13.1",
Expand All @@ -50,7 +50,7 @@
"strip-json-comments": "^3.0.1",
"ts-loader": "^6.0.1",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"webpack": "^4.43.0"
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"@types/autoprefixer": "^9.4.0"
Expand Down
2 changes: 1 addition & 1 deletion app/angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compileOnSave": false,
"compilerOptions": {
"outDir": "dist",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"rootDir": "./src",
"resolveJsonModule": true
}
Expand Down
8 changes: 4 additions & 4 deletions app/aurelia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@
"@storybook/addons": "6.0.0-beta.31",
"@storybook/core": "6.0.0-beta.31",
"@storybook/node-logger": "6.0.0-beta.31",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"fork-ts-checker-webpack-plugin": "^5.0.1",
"global": "^4.3.2",
"ts-loader": "^6.0.1",
"webpack": "^4.33.0"
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"@types/node": "^14.0.10",
"@types/webpack-env": "^1.15.1",
"css-loader": "^3.0.0",
"file-loader": "^4.2.0",
"html-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^4.3.0",
"htmlhint": "^0.11.0",
"node-sass": "^4.12.0",
"rimraf": "^3.0.2",
"sass-loader": "^8.0.0",
"style-loader": "^0.23.0",
"typescript": "latest",
"webpack": "^4.33.0"
"webpack": "5.0.0-beta.17"
},
"peerDependencies": {
"aurelia": "dev"
Expand Down
3 changes: 2 additions & 1 deletion app/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"peerDependencies": {
"@babel/core": "*",
Expand Down
1 change: 1 addition & 0 deletions app/ember/src/server/framework-preset-babel-ember.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { precompile } from 'ember-source/dist/ember-template-compiler';
import { Configuration } from 'webpack'; // eslint-disable-line

// @ts-ignore
export function babel(config: Configuration) {
const babelConfigPlugins = config.plugins || [];

Expand Down
2 changes: 1 addition & 1 deletion app/ember/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"resolveJsonModule": true
},
"include": ["src/**/*", "package.json"],
Expand Down
3 changes: 2 additions & 1 deletion app/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"global": "^4.3.2",
"html-loader": "^1.0.0",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"peerDependencies": {
"@babel/core": "*",
Expand Down
3 changes: 2 additions & 1 deletion app/html/src/server/framework-preset-html.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { Configuration } from 'webpack';
import type { Configuration } from 'webpack';

// @ts-ignore
export function webpack(config: Configuration) {
return {
...config,
Expand Down
2 changes: 1 addition & 1 deletion app/html/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": ["src/**/*"],
"exclude": ["src/__tests__/**/*"]
Expand Down
3 changes: 2 additions & 1 deletion app/marionette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"html-loader": "^1.0.0",
"regenerator-runtime": "^0.13.3"
"regenerator-runtime": "^0.13.3",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"backbone.marionette": "*"
Expand Down
3 changes: 2 additions & 1 deletion app/marko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"peerDependencies": {
"@babel/core": "*",
Expand Down
3 changes: 2 additions & 1 deletion app/mithril/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"mithril": "^1.1.6"
Expand Down
2 changes: 1 addition & 1 deletion app/mithril/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"resolveJsonModule": true
},
"include": [
Expand Down
3 changes: 2 additions & 1 deletion app/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"preact": "^10.4.0"
Expand Down
2 changes: 1 addition & 1 deletion app/preact/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"resolveJsonModule": true
},
"include": [
Expand Down
3 changes: 2 additions & 1 deletion app/rax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"driver-dom": "^2.0.0",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"rax": "^1.1.0"
Expand Down
5 changes: 2 additions & 3 deletions app/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@
"react-docgen-typescript-plugin": "^0.5.0",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1",
"webpack": "^4.43.0"
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"@storybook/client-api": "6.0.0-beta.31",
"@types/node": "^14.0.10",
"@types/webpack": "^4.41.12"
"@types/node": "^14.0.10"
},
"peerDependencies": {
"@babel/core": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion app/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"resolveJsonModule": true
},
"include": [
Expand Down
3 changes: 2 additions & 1 deletion app/riot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"global": "^4.3.2",
"raw-loader": "^4.0.1",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.9.6",
Expand Down
2 changes: 1 addition & 1 deletion app/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"]
"types": ["webpack-env", "node"]
},
"include": ["src/**/*"],
"exclude": ["src/__tests__/**/*"]
Expand Down
3 changes: 2 additions & 1 deletion app/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"core-js": "^3.0.1",
"global": "^4.3.2",
"regenerator-runtime": "^0.13.3",
"ts-dedent": "^1.1.1"
"ts-dedent": "^1.1.1",
"webpack": "5.0.0-beta.17"
},
"devDependencies": {
"@types/webpack-env": "^1.15.2",
Expand Down
2 changes: 1 addition & 1 deletion app/svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"types": ["webpack-env"],
"types": ["webpack-env", "node"],
"resolveJsonModule": true
},
"include": [
Expand Down
Loading