minor: dynamic npm imports
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
const HTMLAsset = require('parcel-bundler/lib/assets/HTMLAsset')
|
||||
|
||||
function shouldIgnore (file) {
|
||||
// Ignore img(src="${...}") on pug & keep the components folder pristine
|
||||
return /\${.+}/.test(file) || /components/.test(file) || /\/lib\/solid-/.test(file) || /\/lib\/sib-/.test(file);
|
||||
// Ignore img(src="${...}") on pug
|
||||
return /\${.+}/.test(file)
|
||||
}
|
||||
|
||||
class SkipStartinbloxWidgetAsset extends HTMLAsset {
|
||||
|
@ -63,9 +63,6 @@ const options = {
|
||||
await fse.copy("./src/locales", "./dist/locales")
|
||||
console.log(`Copied locales to dist folder`);
|
||||
|
||||
await fse.copy("./src/components", "./dist/components")
|
||||
console.log(`Copied components to dist folder`);
|
||||
|
||||
const bundler = new Bundler('./src/index.pug', options);
|
||||
bundler.addAssetType('html', require.resolve('./assets.js'));
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
|
Reference in New Issue
Block a user