Skip to content

Commit

Permalink
chore(build): copy minified map files to prevent 404 error with CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanszogyenyi committed Apr 10, 2023
1 parent 2108d96 commit 740ec91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"build:css:min": "NPM_ENV=production npx postcss src/flowbite.css > dist/flowbite.min.css",
"build:css": "NPM_ENV=development npx postcss src/flowbite.css > dist/flowbite.css",
"build:js": "run-s build:webpack",
"copy:js:dist": "copyfiles --flat static/flowbite.js dist && copyfiles --flat static/flowbite.js.map dist && copyfiles --flat static/flowbite.min.js dist && copyfiles --flat static/flowbite.turbo.js dist && copyfiles --flat static/flowbite.turbo.min.js dist && copyfiles --flat static/flowbite.turbo.js.map dist && copyfiles --flat static/flowbite.phoenix.js dist && copyfiles --flat static/flowbite.phoenix.min.js dist && copyfiles --flat static/flowbite.phoenix.js.map dist && copyfiles --flat static/datepicker.js dist && copyfiles --flat static/datepicker.min.js dist && copyfiles --flat static/datepicker.js.map dist && copyfiles --flat static/datepicker.turbo.js dist && copyfiles --flat static/datepicker.turbo.min.js dist && copyfiles --flat static/datepicker.turbo.js.map dist",
"copy:js:dist": "copyfiles --flat static/flowbite.js dist && copyfiles --flat static/flowbite.js.map dist && copyfiles --flat static/flowbite.min.js.map dist && copyfiles --flat static/flowbite.min.js dist && copyfiles --flat static/flowbite.turbo.js dist && copyfiles --flat static/flowbite.turbo.min.js dist && copyfiles --flat static/flowbite.turbo.js.map dist && copyfiles --flat static/flowbite.turbo.min.js.map dist && copyfiles --flat static/flowbite.phoenix.js dist && copyfiles --flat static/flowbite.phoenix.min.js dist && copyfiles --flat static/flowbite.phoenix.js.map dist && copyfiles --flat static/flowbite.phoenix.min.js.map dist && copyfiles --flat static/datepicker.js dist && copyfiles --flat static/datepicker.min.js dist && copyfiles --flat static/datepicker.js.map dist && copyfiles --flat static/datepicker.turbo.js dist && copyfiles --flat static/datepicker.turbo.min.js dist && copyfiles --flat static/datepicker.turbo.js.map dist",
"build:dist": "mkdir -p dist && run-s build:css:min build:css build:js copy:js:dist",
"build:lib": "tsc --outDir lib/cjs && tsc -m es6 --outDir lib/esm",
"clean:lib": "shx rm -rf lib",
Expand Down
10 changes: 8 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ module.exports = {
'flowbite.phoenix.min': path.resolve(__dirname, 'src/index.phoenix.ts'),
datepicker: path.resolve(__dirname, 'src/plugins/datepicker.js'),
'datepicker.min': path.resolve(__dirname, 'src/plugins/datepicker.js'),
'datepicker.turbo': path.resolve(__dirname, 'src/plugins/datepicker.turbo.js'),
'datepicker.turbo.min': path.resolve(__dirname, 'src/plugins/datepicker.turbo.js'),
'datepicker.turbo': path.resolve(
__dirname,
'src/plugins/datepicker.turbo.js'
),
'datepicker.turbo.min': path.resolve(
__dirname,
'src/plugins/datepicker.turbo.js'
),
docs: path.resolve(__dirname, 'src/docs.js'),
},
devtool: 'inline-source-map',
Expand Down

0 comments on commit 740ec91

Please sign in to comment.