mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 15:18:15 +00:00
fucking javascript
This commit is contained in:
parent
ff65478966
commit
be6395ea9e
3 changed files with 33 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import Rails from "@rails/ujs";
|
||||
Rails.start();
|
||||
import "@primer/view-components/app/components/primer/primer.js";
|
||||
import "@primer/view-components";
|
||||
|
||||
import "../controllers/upload_dropzone.js";
|
||||
|
|
|
|||
7
config/initializers/primer.rb
Normal file
7
config/initializers/primer.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Disable the gem's automatic JS inclusion - we import it manually via Vite
|
||||
# from the @primer/view-components npm package to avoid duplicate custom element registration
|
||||
Primer::ViewComponents.configure do |config|
|
||||
config.silence_deprecations = true
|
||||
end
|
||||
|
|
@ -7,15 +7,37 @@ export default defineConfig({
|
|||
],
|
||||
|
||||
build: {
|
||||
minify: false
|
||||
minify: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
resolve: {
|
||||
dedupe: ['@primer/view-components', '@github/catalyst']
|
||||
dedupe: [
|
||||
'@primer/view-components',
|
||||
'@github/catalyst',
|
||||
'@github/relative-time-element',
|
||||
'@github/clipboard-copy-element',
|
||||
'@github/details-menu-element',
|
||||
'@github/include-fragment-element',
|
||||
'@github/image-crop-element'
|
||||
],
|
||||
alias: [
|
||||
{
|
||||
find: /^@primer\/view-components$/,
|
||||
replacement: '@primer/view-components/app/assets/javascripts/primer_view_components.js'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
optimizeDeps: {
|
||||
include: ['@primer/view-components'],
|
||||
include: [
|
||||
'@primer/view-components',
|
||||
'@github/catalyst'
|
||||
],
|
||||
esbuildOptions: {
|
||||
keepNames: true
|
||||
}
|
||||
|
|
@ -26,6 +48,4 @@ export default defineConfig({
|
|||
overlay: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue