Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
useTypescriptIncrementalApi: true,
})
];
if (configOptions.production) {
plugins.push(new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name]-[hash].css",
chunkFilename: "[id]-[hash].css",
ignoreOrder: true
}));
} else {
const jasmineFiles = jasmineCore.files;
const entries = getEntries(configOptions);
delete entries.specRoot;
const jasmineIndexPage = {
inject: true,
xhtml: true,
filename: "_specRunner.html",
template: path.join(configOptions.railsRoot, "spec", "webpack", "_specRunner.html.ejs"),
jasmineJsFiles: _.map(jasmineFiles.jsFiles.concat(jasmineFiles.bootFiles), (file) => {
return `__jasmine/${file}`;
}),
jasmineCssFiles: _.map(jasmineFiles.cssFiles, (file) => {
return `__jasmine/${file}`;
}),
excludeChunks: _.keys(entries)
new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
useTypescriptIncrementalApi: true,
})
];
if (configOptions.production) {
plugins.push(new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name]-[hash].css",
chunkFilename: "[id]-[hash].css",
}));
plugins.push(new OptimizeCssAssetsPlugin());
} else {
const jasmineFiles = jasmineCore.files;
const entries = getEntries(configOptions);
delete entries.specRoot;
const jasmineIndexPage = {
inject: true,
xhtml: true,
filename: "_specRunner.html",
template: path.join(configOptions.railsRoot, "spec", "webpack", "_specRunner.html.ejs"),
jasmineJsFiles: _.map(jasmineFiles.jsFiles.concat(jasmineFiles.bootFiles), (file) => {
return `__jasmine/${file}`;
}),
jasmineCssFiles: _.map(jasmineFiles.cssFiles, (file) => {
return `__jasmine/${file}`;
}),
excludeChunks: _.keys(entries)
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const jasmineCore = require('jasmine-core')
const jasmineFiles = jasmineCore.files
const jasminePath = resolveJasmineDir(jasmineFiles.path)
const jasmineBootDir = resolveJasmineDir(jasmineFiles.bootDir)
const jasmineJsFiles = resolveJasmineFiles(jasminePath, jasmineFiles.jsFiles)
const jasmineCssFiles = resolveJasmineFiles(jasminePath, jasmineFiles.cssFiles)
const jasmineBootFiles = resolveJasmineFiles(jasmineBootDir, jasmineFiles.bootFiles)
function JasmineWebpackPlugin (options = {}) {
return new HtmlWebpackPlugin({
title: 'vue-ime-model test runner',
filename: options.filename || 'index.html',
template: './config/webpack.runner.template.html',
jasmineJsFiles: jasmineJsFiles.concat(jasmineBootFiles),
jasmineCssFiles
})
}
});
};
};
config.plugins.push(new LicensePlugin());
if (production) {
fsExtra.removeSync(config.output.path);
config.devtool = "source-map";
} else {
config.devtool = "inline-source-map";
config.resolve.modules.push(path.join(__dirname, 'spec', 'webpack'));
const jasmineCore = require('jasmine-core');
const jasmineFiles = jasmineCore.files;
const HtmlWebpackPlugin = require('html-webpack-plugin');
const jasmineIndexPage = {
inject: true,
xhtml: true,
filename: '_specRunner.html',
template: path.join(__dirname, '..', 'spec', 'webpack', '_specRunner.html.ejs'),
jasmineJsFiles: _.map(jasmineFiles.jsFiles.concat(jasmineFiles.bootFiles), (file) => {
return `__jasmine/${file}`;
}),
jasmineCssFiles: _.map(jasmineFiles.cssFiles, (file) => {
return `__jasmine/${file}`;
}),
excludeChunks: _.keys(entries)
};
module.exports = function (env) {
const baseConfig = baseConfigFn(env);
const assetsDir = path.join(__dirname, '..', 'webpack');
const jasmineFiles = jasmineCore.files;
const jasmineIndexPage = {
inject: true,
xhtml: true,
filename: '_specRunner.html',
template: path.join(__dirname, '..', 'spec', 'webpack', '_specRunner.html.ejs'),
jasmineJsFiles: _.map(jasmineFiles.jsFiles.concat(jasmineFiles.bootFiles), (file) => {
return `__jasmine/${file}`;
}),
jasmineCssFiles: _.map(jasmineFiles.cssFiles, (file) => {
return `__jasmine/${file}`;
}),
excludeChunks: _.keys(baseConfig.entry)
};
const JasmineAssetsPlugin = function (_options) {