@web/dev-server-rollup
Advanced tools
Comparing version 0.2.8 to 0.2.9
# @web/dev-server-rollup | ||
## 0.2.9 | ||
### Patch Changes | ||
- 6949d03: fix serving generated rollup chunks | ||
## 0.2.8 | ||
@@ -4,0 +10,0 @@ |
@@ -10,3 +10,2 @@ "use strict"; | ||
async function bundleEntrypoints(rollupConfig) { | ||
var _a; | ||
const bundle = await rollup_1.rollup(rollupConfig); | ||
@@ -16,3 +15,3 @@ if (Array.isArray(rollupConfig.output)) { | ||
} | ||
return bundle.generate((_a = rollupConfig.output) !== null && _a !== void 0 ? _a : {}); | ||
return bundle.generate(Object.assign(Object.assign({}, rollupConfig.output), { chunkFileNames: '__rollup-generated__[name].js', assetFileNames: '__rollup-generated__[name][extname]' })); | ||
} | ||
@@ -59,2 +58,5 @@ function rollupBundlePlugin(pluginOptions) { | ||
} | ||
else if (context.path.includes('__rollup-generated__')) { | ||
return servedFiles.get(`/${path_1.default.basename(context.path)}`); | ||
} | ||
}, | ||
@@ -61,0 +63,0 @@ }; |
{ | ||
"name": "@web/dev-server-rollup", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -14,3 +14,8 @@ import { Plugin } from '@web/dev-server-core'; | ||
} | ||
return bundle.generate(rollupConfig.output ?? {}); | ||
return bundle.generate({ | ||
...rollupConfig.output, | ||
chunkFileNames: '__rollup-generated__[name].js', | ||
assetFileNames: '__rollup-generated__[name][extname]', | ||
}); | ||
} | ||
@@ -61,2 +66,4 @@ | ||
return content; | ||
} else if (context.path.includes('__rollup-generated__')) { | ||
return servedFiles.get(`/${path.basename(context.path)}`); | ||
} | ||
@@ -63,0 +70,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67933
1027