Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
extensions.push('.ts', '.tsx')
}
let sassRule = {
test: /\.s[ac]ss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
};
if (Mix.preprocessors) {
sassRule.exclude = Mix.preprocessors.map(preprocessor => preprocessor.test());
}
rules.push(sassRule);
if (Mix.preprocessors) {
Mix.preprocessors.forEach(preprocessor => {
rules.push(preprocessor.rules());
plugins.push(preprocessor.extractPlugin);
});
}
module.exports.module = { rules };
/*
|--------------------------------------------------------------------------
| Resolve
|--------------------------------------------------------------------------
|
},
{
test: /\.(woff2?|ttf|eot|svg|otf)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]?[hash]',
publicPath: '/'
}
}
]
};
if (Mix.preprocessors) {
Mix.preprocessors.forEach(toCompile => {
let extractPlugin = new plugins.ExtractTextPlugin(
Mix.cssOutput(toCompile)
);
let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';
module.exports.module.rules.push({
test: new RegExp(toCompile.src.path.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
{ loader: 'css-loader' + sourceMap },
{ loader: 'postcss-loader' + sourceMap }
].concat(
toCompile.type == 'sass' ? [
{ loader: 'resolve-url-loader' + sourceMap },
}
},
{
test: /\.(woff2?|ttf|eot|svg|otf)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]?[hash]',
publicPath: '/'
}
}
]
};
if (Mix.preprocessors) {
Mix.preprocessors.forEach(toCompile => {
let extractPlugin = new plugins.ExtractTextPlugin(
Mix.cssOutput(toCompile)
);
let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';
module.exports.module.rules.push({
test: new RegExp(toCompile.src.path.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
{ loader: 'css-loader' + sourceMap },
{ loader: 'postcss-loader' + sourceMap }
].concat(
toCompile.type == 'sass' ? [
},
{
test: /\.(cur|ani)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]',
publicPath: Mix.resourceRoot
}
}
]
};
if (Mix.preprocessors) {
Mix.preprocessors.forEach(preprocessor => {
module.exports.module.rules.push(preprocessor.rules());
module.exports.plugins = (module.exports.plugins || []).concat(preprocessor.extractPlugin);
});
}
/*
|--------------------------------------------------------------------------
| Resolve
|--------------------------------------------------------------------------
|
| Here, we may set any options/aliases that affect Webpack's resolving
| of modules. To begin, we will provide the necessary Vue alias to
| load the Vue common library. You may delete this, if needed.
|
}
},
{
test: /\.(woff2?|ttf|eot|svg|otf)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]?[hash]',
publicPath: '/'
}
}
]
};
if (Mix.preprocessors) {
Mix.preprocessors.forEach(toCompile => {
let extractPlugin = new plugins.ExtractTextPlugin(
Mix.cssOutput(toCompile)
);
let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';
module.exports.module.rules.push({
test: new RegExp(toCompile.src.path.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
{ loader: 'css-loader' + sourceMap },
{ loader: 'postcss-loader' + sourceMap }
].concat(
toCompile.type == 'sass' ? [
},
publicPath: Mix.options.resourceRoot
}
},
{
test: /\.(cur|ani)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]',
publicPath: Mix.options.resourceRoot
}
}
];
if (Mix.preprocessors) {
Mix.preprocessors.forEach(preprocessor => {
rules.push(preprocessor.rules());
plugins.push(preprocessor.extractPlugin);
});
}
module.exports.module = { rules }
/*
|--------------------------------------------------------------------------
| Resolve
|--------------------------------------------------------------------------
|
},
{
test: /\.(woff2?|ttf|eot|svg|otf)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]?[hash]',
publicPath: '/'
}
}
]
};
if (Mix.preprocessors) {
Mix.preprocessors.forEach(toCompile => {
let extractPlugin = new plugins.ExtractTextPlugin(
Mix.cssOutput(toCompile)
);
let sourceMap = Mix.sourcemaps ? '?sourceMap' : '';
module.exports.module.rules.push({
test: new RegExp(toCompile.src.path.replace(/\\/g, '\\\\') + '$'),
loader: extractPlugin.extract({
fallbackLoader: 'style-loader',
loader: [
{ loader: 'css-loader' + sourceMap },
{ loader: 'postcss-loader' + sourceMap }
].concat(
toCompile.type == 'sass' ? [
{ loader: 'resolve-url-loader' + sourceMap },
},
publicPath: Mix.options.resourceRoot
}
},
{
test: /\.(cur|ani)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]',
publicPath: Mix.options.resourceRoot
}
}
];
if (Mix.preprocessors) {
Mix.preprocessors.forEach(preprocessor => {
rules.push(preprocessor.rules());
plugins.push(preprocessor.extractPlugin);
});
}
module.exports.module = { rules };
/*
|--------------------------------------------------------------------------
| Resolve
|--------------------------------------------------------------------------
|