-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
388 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -529,7 +529,13 @@ Here's a list of modules that alasql requires | |
#### Webpack | ||
Use the built-in IgnorePlugin | ||
There are several ways to handled alasql with webpack | ||
##### IgnorePlugin | ||
Ideal when you want to control which modules you want to import. | ||
```js | ||
var IgnorePlugin = require("webpack").IgnorePlugin; | ||
|
@@ -541,6 +547,29 @@ module.exports = { | |
}; | ||
``` | ||
##### module.noParse | ||
As of alasql 0.3.5, you can simply tell webpack not to parse alasql, which avoids all the dynamic require warnings and avoids using eval/clashing with CSP with script-loader. | ||
[Read the webpack docs about noParse](https://webpack.github.io/docs/configuration.html#module-noparse) | ||
```js | ||
... | ||
//Don't parse alasql | ||
{module:noParse:[/alasql/]} | ||
``` | ||
##### script-loader | ||
If both of the solutions above fail to meet your requirements, you can load alasql with [script-loader](https://github.com/webpack/script-loader). | ||
```js | ||
//Load alasql in the global scope with script-loader | ||
import "script!alasql" | ||
``` | ||
This can cause issues if you have a CSP that doesn't allow eval. | ||
#### Browserify | ||
Read up on [excluding](https://github.com/substack/browserify-handbook#excluding), [ignoring](https://github.com/substack/browserify-handbook#ignoring), and [shimming](https://github.com/substack/browserify-handbook#shimming) | ||
|
@@ -667,4 +696,4 @@ and other people for useful tools, which make our work much easier. | |
---- | ||
<a href="http://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/14003946/d6e5c076-f156-11e5-8238-e62d2a8d20dc.png" align="right" alt="AlaSQL logo"/></a> | ||
© 2014-2016, Andrey Gershun ([email protected]) & M. Rangel Wulff ([email protected]) | ||
© 2014-2016, Andrey Gershun ([email protected]) & M. Rangel Wulff ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,5 +58,5 @@ | |
"bin", | ||
"lib" | ||
], | ||
"version": "0.3.5" | ||
"version": "0.3.6" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.