Use vite instead of parcel

This commit is contained in:
Andreas Hocevar
2022-07-26 18:29:30 +02:00
parent b5afd06edf
commit 1e15daa354

View File

@@ -13,7 +13,7 @@ const baseDir = dirname(fileURLToPath(import.meta.url));
const isCssRegEx = /\.css(\?.*)?$/; const isCssRegEx = /\.css(\?.*)?$/;
const isJsRegEx = /\.js(\?.*)?$/; const isJsRegEx = /\.js(\?.*)?$/;
const importRegEx = /\simport .* from '([^']+)';\s/g; const importRegEx = /\s?import .*? from '([^']+)'/g;
const isTemplateJs = const isTemplateJs =
/\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/; /\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/;
const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/; const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/;
@@ -345,11 +345,11 @@ export default class ExampleBuilder {
name: data.name, name: data.name,
dependencies: getDependencies(jsSources, pkg), dependencies: getDependencies(jsSources, pkg),
devDependencies: { devDependencies: {
parcel: '^2.0.0', vite: '^3.0.3',
}, },
scripts: { scripts: {
start: 'parcel index.html', start: 'vite',
build: 'parcel build --public-url . index.html', build: 'vite build',
}, },
}, },
null, null,