Skip to content
Draft
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
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ Then, start the dev-server by running:
npm start
```

This will open a webpack-dev-server at http://localhost:8080 and watch
for file changes.
This will start the vite dev server at http://localhost:8080 with HMR.

### Quick rebuild

Expand Down
2 changes: 1 addition & 1 deletion build-tools/tasks/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = task('test:a11y', async () => {
},
};
const shard = parseArgs({ options, strict: false }).values.shard;
const devServer = execa('webpack', ['serve', '--config', 'pages/webpack.config.integ.cjs'], {
const devServer = execa('vite', ['--config', 'vite.config.integ.js'], {
env: {
NODE_ENV: 'development',
},
Expand Down
19 changes: 9 additions & 10 deletions build-tools/tasks/build-pages.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const { cpSync } = require('node:fs');
const { promisify } = require('util');
const webpack = require('webpack');
const { build } = require('vite');
const { parallel } = require('gulp');
const path = require('path');
const { mkdirSync, existsSync } = require('fs');
const createConfig = require('../../pages/webpack.config.cjs');
const { task } = require('../utils/gulp-utils');
const workspace = require('../utils/workspace');

const asyncWebpack = promisify(webpack);

async function buildPagesStatic() {
const stats = await asyncWebpack(createConfig());

console.log(stats.toString({ colors: true }));
if (stats.hasErrors()) {
throw new Error('Error while running webpack');
try {
await build({
configFile: path.resolve(__dirname, '../../vite.config.js'),
mode: 'production',
});
} catch (error) {
console.error('Error while running vite build:', error);
throw error;
}
}

Expand Down
2 changes: 1 addition & 1 deletion build-tools/tasks/integ.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = task('test:integ', async () => {
reactVersion: { type: 'string' },
};
const { shard, reactVersion = '16' } = parseArgs({ options, strict: false }).values;
const devServer = execa('webpack', ['serve', '--config', 'pages/webpack.config.integ.cjs'], {
const devServer = execa('vite', ['--config', 'vite.config.integ.js'], {
env: {
NODE_ENV: 'development',
REACT_VERSION: reactVersion,
Expand Down
2 changes: 1 addition & 1 deletion build-tools/tasks/motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = task('test:motion', async () => {
reactVersion: { type: 'string' },
};
const { reactVersion = '16' } = parseArgs({ options, strict: false }).values;
const devServer = execa('webpack', ['serve', '--config', 'pages/webpack.config.integ.cjs'], {
const devServer = execa('vite', ['--config', 'vite.config.integ.js'], {
env: {
NODE_ENV: 'development',
REACT_VERSION: reactVersion,
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default tsEslint.config(
},
},
{
files: ['.github/**', 'build-tools/**', 'scripts/**', 'pages/webpack.*', 'jest.*.js', 'gulpfile.js'],
files: ['.github/**', 'build-tools/**', 'scripts/**', 'jest.*.js', 'gulpfile.js'],
languageOptions: {
globals: {
...globals.node,
Expand Down
Loading
Loading