Skip to content

Commit

Permalink
rollup: polish configs
Browse files Browse the repository at this point in the history
  • Loading branch information
puzrin committed Dec 7, 2023
1 parent 74ca77a commit 92f2150
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -11,12 +11,12 @@
],
"repository": "markdown-it/markdown-it",
"license": "MIT",
"main": "dist/markdown-it.cjs.js",
"main": "dist/index.cjs.js",
"module": "index.mjs",
"exports": {
".": {
"import": "./index.mjs",
"require": "./dist/markdown-it.cjs.js"
"require": "./dist/index.cjs.js"
},
"./*": {
"require": "./*",
Expand Down Expand Up @@ -55,7 +55,6 @@
"devDependencies": {
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"ansi": "^0.3.0",
Expand Down
2 changes: 0 additions & 2 deletions support/demo_template/rollup.config.mjs
@@ -1,12 +1,10 @@
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import terser from '@rollup/plugin-terser'

const plugins = [
nodeResolve({ preferBuiltins: true }),
commonjs(),
json({ namedExports: false }),
// Here terser is used only to force ascii output
terser({
mangle: false,
Expand Down
6 changes: 3 additions & 3 deletions support/rollup.config.mjs
Expand Up @@ -9,7 +9,7 @@ const config_umd_full = {
input: 'index.mjs',
output: [
{
file: 'dist/markdown-it.js',
file: `dist/${pkg.name}.js`,
format: 'umd',
name: 'markdownit',
plugins: [
Expand All @@ -22,7 +22,7 @@ const config_umd_full = {
]
},
{
file: 'dist/markdown-it.min.js',
file: `dist/${pkg.name}.min.js`,
format: 'umd',
name: 'markdownit',
plugins: [
Expand All @@ -46,7 +46,7 @@ const config_umd_full = {
const config_cjs_no_deps = {
input: 'index.mjs',
output: {
file: 'dist/markdown-it.cjs.js',
file: 'dist/index.cjs.js',
format: 'cjs'
},
external: Object.keys(pkg.dependencies),
Expand Down

0 comments on commit 92f2150

Please sign in to comment.