asset-conjurer
v1.4.10
Published
Example:
Downloads
809
Readme
asset-conjurer
Example:
buildAssets({
watch: true,
afterBuild: () => {
// after build js
},
js: {
pathIn: 'src/js',
pathOut: 'www/assets/js',
pathHash: 'tmp/hash',
name: 'main',
bundler: 'esbuild', // or 'webpack'
esbuildFormat: 'module', // https://esbuild.github.io/api/#format
webpackTarget: 'es2020', // https://webpack.js.org/configuration/target/
webpackOutputChunkFormat: 'esm', // https://webpack.js.org/configuration/output/#outputchunkformat
watches: ['../common/js'] // additional folders to watch
},
scss: {
pathIn: 'src/scss',
pathOut: 'www/assets/css',
name: '1-basic',
watches: [`src/another-scss`] // additional folders to watch
},
absolutePath: __dirname
});
Breaking change on 1.4.x: asset copy has been removed, watches only admits routes without glob queries.