2021-10-20 12:09:13 +00:00
|
|
|
const mix = require('laravel-mix');
|
2021-10-20 11:45:30 +00:00
|
|
|
|
|
|
|
mix.webpackConfig({
|
|
|
|
externals: {
|
2021-10-20 12:09:13 +00:00
|
|
|
$: 'jQuery',
|
|
|
|
jquery: 'jQuery',
|
2021-10-20 11:45:30 +00:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [{
|
|
|
|
test: /\.m?js$/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
cacheDirectory: true,
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
modules: false,
|
|
|
|
forceAllTransforms: true,
|
|
|
|
targets: {
|
|
|
|
browsers: ['> 2%'],
|
|
|
|
},
|
|
|
|
},
|
2021-10-20 12:09:13 +00:00
|
|
|
],
|
2021-10-20 11:45:30 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
mix.js('src/js/main.js', 'dist/js');
|
|
|
|
|
|
|
|
mix
|
2021-10-20 12:09:13 +00:00
|
|
|
.sass('src/scss/main.scss', 'dist/css')
|
|
|
|
.sass('src/scss/editor.scss', 'dist/css')
|
2021-10-20 11:45:30 +00:00
|
|
|
.options({ processCssUrls: false });
|
|
|
|
|
2021-10-20 12:09:13 +00:00
|
|
|
mix
|
|
|
|
.copy('src/images', 'images')
|
|
|
|
.copy('node_modules/jquery/dist/jquery.min.js', 'dist/js');
|