load core libraries from jsDelivr
This commit is contained in:
parent
058e0d9f22
commit
850efe9fe2
@ -52,6 +52,13 @@ class FootComposer
|
||||
}
|
||||
if (Str::startsWith(config('app.asset.env'), 'dev')) {
|
||||
$scripts[] = $this->webpack->url('style.js');
|
||||
} else {
|
||||
$scripts[] = 'https://cdn.jsdelivr.net/combine/'.
|
||||
'npm/react@16.13/umd/react.production.min.js,'.
|
||||
'npm/react-dom@16.13/umd/react-dom.production.min.js,'.
|
||||
'npm/jquery@3.4,'.
|
||||
'npm/bootstrap@4.4/dist/js/bootstrap.min.js,'.
|
||||
'npm/admin-lte@3.0/dist/js/adminlte.min.js';
|
||||
}
|
||||
$scripts[] = $this->webpack->url('app.js');
|
||||
|
||||
|
@ -75,6 +75,7 @@ class HeadComposer
|
||||
{
|
||||
$view->with('styles', [
|
||||
$this->webpack->url('style.css'),
|
||||
'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css',
|
||||
]);
|
||||
$view->with('inline_css', option('custom_css'));
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ const config = {
|
||||
app: ['react-hot-loader/patch', '@/index.tsx'],
|
||||
style: [
|
||||
'@/styles/admin-lte.scss',
|
||||
'@fortawesome/fontawesome-free/css/all.min.css',
|
||||
'@/styles/common.styl',
|
||||
'@/styles/common.scss',
|
||||
],
|
||||
@ -137,6 +136,15 @@ const config = {
|
||||
'@': path.resolve(__dirname, 'resources/assets/src'),
|
||||
},
|
||||
},
|
||||
externals: devMode
|
||||
? {}
|
||||
: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
jquery: 'jQuery',
|
||||
bootstrap: 'bootstrap',
|
||||
'admin-lte': 'adminlte',
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user