Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
(err, result) => {
if (err) return reject(err);
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'
}
},
(err, result) => {
if (err) return reject(err);
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'
}
src: [`${options.rootDir}/native/*`],
dest: options.output,
},
],
copyOnce: true,
}),
alias(options),
url({
limit: 0,
fileName: '[dirname][name][extname]',
publicPath: '/',
sourceDir: path.resolve(options.cwd, options.rootDir),
include: ['**/*.svg', '**/*.png', '**/*.jpg', '**/*.jpeg', '**/*.gif'],
}),
json(),
resolve({
dedupe: [
'react',
'object-assign',
'prop-types',
'scheduler',
'react-reconciler',
],
extensions,
customResolveOptions: {
moduleDirectory: 'node_modules',
},
}),
commonjs({
include: /node_modules/,
namedExports,
extensions,
tslint({
exclude: ['**/*.json', 'node_modules/**'],
throwError: true
}),
commonjs(),
standalone && globals(),
typescript(),
transpile && babel({
extensions: [
...DEFAULT_EXTENSIONS,
'ts',
'tsx'
],
runtimeHelpers: true
}),
standalone && resolve({
preferBuiltins: false
}),
!process.env.ROLLUP_WATCH && standalone && minify({
comments: false
})
].filter(Boolean);
}
input: opts.entry,
external: ["vue"],
plugins: [
css({
output: "dist/vue-finder.css"
}),
vue({ compileTemplate: true, css: false }),
alias({
entries: [
{
find: "@",
replacement: path.resolve("src")
}
]
}),
resolve({
browser: true,
preferBuiltins: false,
extensions: [".js", ".json", ".vue"]
}),
json(),
babel({
exclude: "node_modules/**",
sourceMap: true,
runtimeHelpers: true,
extensions: [".js", ".jsx", ".vue"]
}),
commonjs(),
filesize()
].concat(opts.plugins || []),
output: {
exports: "named",