SVG handling

This commit is contained in:
2019-11-22 16:15:53 +01:00
parent 029fe16b6d
commit 698656c8f6
10 changed files with 147 additions and 14 deletions

View File

@@ -34,6 +34,30 @@ export default [
})
]
},
// SVG test
{
input: 'test/svg/index.jsx',
output: {
file: 'public/svg/index.js',
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
sourcemap: true
},
plugins: [
sass(),
babel(), // babel
resolve({
extensions: [ '.mjs', '.js', '.jsx', '.json' ],
}), // node_modules
commonjs(), // CJS-modules
production && terser(), // minify, but only in production
copy({
targets: [
{ src: 'test/svg/index.html', dest: 'public/svg' }
],
copyOnce: true
})
]
},
// Todos MVC
{
input: 'test/todos-mvc/index.jsx',