Browse Source

add webpack config

pull/12/head
Guillermo 8 years ago
parent
commit
2b679123fa
  1. 4
      webpack.config.dev.js
  2. 2
      webpack.config.prod.js

4
webpack.config.dev.js

@ -7,7 +7,7 @@ function config({entry, output, include}) {
entry, entry,
output: Object.assign({}, output, { output: Object.assign({}, output, {
path: path.join(__dirname, 'build'), path: path.join(__dirname, 'build'),
publicPath: '/build/', publicPath: '/tesseract/',
}), }),
plugins: [ plugins: [
new webpack.NoErrorsPlugin() new webpack.NoErrorsPlugin()
@ -29,7 +29,7 @@ module.exports = [{
entry: './src/browser/index.js', entry: './src/browser/index.js',
output: { output: {
filename: 'tesseract.js', filename: 'tesseract.js',
library: "createTesseractWorker", library: "Tesseract",
libraryTarget: "umd" libraryTarget: "umd"
}, },
include: [path.join(__dirname, 'src/browser')] include: [path.join(__dirname, 'src/browser')]

2
webpack.config.prod.js

@ -33,7 +33,7 @@ module.exports = [{
entry: './src/browser/index.js', entry: './src/browser/index.js',
output: { output: {
filename: 'tesseract.js', filename: 'tesseract.js',
library: "createTesseractWorker", library: "Tesseract",
libraryTarget: "umd" libraryTarget: "umd"
}, },
include: [path.join(__dirname, 'src/browser')] include: [path.join(__dirname, 'src/browser')]

Loading…
Cancel
Save