Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resolve({
code: result.css.toString(),
map: result.map.toString()
});
}
);
});
}
}
}),
resolve(),
commonjs(),
json(),
babel({
// don't exclude anything!
// exclude: [/node_modules\/(?!(@datawrapper|svelte)\/).*/],
extensions: ['.js', '.mjs', '.html'],
babelHelpers: 'runtime',
presets: [
[
'@babel/env',
{
targets: 'last 2 versions, not IE 10, not dead',
corejs: 3,
useBuiltIns: 'entry'
}
]
],
plugins: ['babel-plugin-transform-async-to-promises', '@babel/plugin-transform-runtime']
}),
resolve({
code: result.css.toString(),
map: result.map.toString()
});
}
);
});
}
}
}),
resolve(),
commonjs(),
json(),
babel({
// don't exclude anything!
// exclude: [/node_modules\/(?!(@datawrapper|svelte)\/).*/],
extensions: ['.js', '.mjs', '.html'],
babelHelpers: 'runtime',
presets: [
[
'@babel/env',
{
targets: 'last 2 versions, not IE 10, not dead',
corejs: 3,
useBuiltIns: 'entry'
}
]
],
plugins: [
'babel-plugin-transform-async-to-promises',
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode),
'process.env.APIURL': JSON.stringify(apiUrl)
}),
svelte({
dev,
hydratable: true,
emitCss: true
}),
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
legacy && babel({
extensions: ['.js', '.mjs', '.html', '.svelte'],
babelHelpers: 'runtime',
exclude: ['node_modules/@babel/**'],
presets: [
['@babel/preset-env', {
targets: '> 0.25%, not dead'
}]
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-transform-runtime', {
useESModules: true
}]
]
}),
replace({
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode)
}),
svelte({
dev,
hydratable: true,
emitCss: true
}),
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
legacy && babel({
extensions: ['.js', '.mjs', '.html', '.svelte'],
babelHelpers: 'runtime',
exclude: ['node_modules/@babel/**'],
presets: [
['@babel/preset-env', {
targets: '> 0.25%, not dead'
}]
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-transform-runtime', {
useESModules: true
}]
]
}),