Use vite instead of parcel
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user