Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return context;
})();
console.log(context);
console.log(resolveToProductPath(context));
const rollupUrlOptions = {
fileName: '[dirname][name][extname]',
...restContentImages,
publicPath: path.join(modulePath, destDir, '/'),
destDir,
sourceDir: path.dirname(input),
limit: 0,
};
return rollupUrl(rollupUrlOptions);
}
destDir: options.resolveFilesImport.output,
output: options.output,
context: options.context,
});
const rollupUrlOptions = {
fileName: '[dirname][name][extname]',
publicPath: path.join(productContext, destDir, '/'),
destDir: path.join(options.context, destDir),
sourceDir: path.dirname(options.input),
include: options.resolveFilesImport.include,
exclude: options.resolveFilesImport.exclude,
limit: 0,
};
return rollupUrl(rollupUrlOptions);
}
return undefined;
}
};
const extensions = ['.js', '.ts', '.tsx', '.json'];
const plugins = [
resolve({ extensions }),
commonjs({
namedExports: {
react: Object.keys(React),
'react-dom': Object.keys(ReactDOM)
}
}),
babel({ exclude: 'node_modules/**', extensions }),
replace({
'process.env.NODE_ENV': JSON.stringify(isDev ? 'development' : 'production')
}),
!isLib && url(),
!isLib && postcss({ extract: true, sourceMap: isDev, minimize: !isDev }),
!isLib && html({ template }),
!isLib &&
copy({
targets: [
{ src: 'src/static/example_assets', dest: 'src/.dev', rename: 'assets' }
]
}),
isDev && serve('src/.dev'),
isDev && livereload(),
!isDev && terser(),
!isDev && filesize(),
isExample &&
copy({
targets: [{ src: 'src/.dev', dest: '.', rename: 'example' }],
hook: 'writeBundle'