Skip to content

Commit

Permalink
Merge pull request #18857 from storybookjs/norbert/sb-631-sb18789-the…
Browse files Browse the repository at this point in the history
…ming-v700-alpha16-no-loader

add image support to builder-manager
  • Loading branch information
ndelangen authored Aug 5, 2022
2 parents 67102c8 + b503e3d commit c8bcbeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion code/lib/builder-manager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => {
outdir: join(options.outputDir || './', 'sb-addons'),
format: 'esm',
outExtension: { '.js': '.mjs' },
loader: { '.js': 'jsx' },
loader: {
'.js': 'jsx',
'.png': 'dataurl',
'.gif': 'dataurl',
'.jpg': 'dataurl',
'.jpeg': 'dataurl',
'.svg': 'dataurl',
'.webp': 'dataurl',
'.webm': 'dataurl',
},
target: ['chrome100'],
platform: 'browser',
bundle: true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async function run() {
const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.prepare;
const cwd = resolve(__dirname, '..', 'code', v.location);
const sub = require('execa').command(
`yarn ${commmand}${watchMode ? ' --watch' : ''}${prodMode ? ' --optimized' : ''}`,
`${commmand}${watchMode ? ' --watch' : ''}${prodMode ? ' --optimized' : ''}`,
{
cwd,
buffer: false,
Expand Down

0 comments on commit c8bcbeb

Please sign in to comment.