-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
33 lines (29 loc) · 874 Bytes
/
webpack.mix.js
File metadata and controls
33 lines (29 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let mix = require('laravel-mix');
const webpack = require('webpack')
require('mix-env-file');
require('laravel-mix-replace-in-file')
mix.env(process.env.ENV_FILE);
mix.setPublicPath('./')
.css('assets/css/popup.css', 'dist/css')
.sass('assets/css/main.scss', 'dist/css')
.copy('assets/images', 'dist/images')
.copy('assets/popup.html', 'dist')
.copy('assets/manifest.json', 'dist')
.js('assets/js/background.js', 'dist/js')
.js('assets/js/utils.js', 'dist/js')
.js('assets/js/app_main.js', 'dist/js').vue()
.options({
processCssUrls: false
});
mix.replaceInFile( {
files: 'dist/manifest.json',
from: /CHROME_EXTENSION_ID/g,
to: process.env.MIX_CHROME_EXTENSION_ID,
});
mix.webpackConfig ({
plugins: [
new webpack.DefinePlugin({
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
}),
],
})